item.find('a', class_ = 'marginright5 link linkWithHash detailsLink linkWithHashPromoted').get_text(strip = True)
import requests
from bs4 import BeautifulSoup
URL = 'https://blog.torproject.org/'
page = requests.get(URL)
soup = BeautifulSoup(page.content, 'html.parser')
results = soup.find_all('h2', class_='title')
for result in results:
print("%s" % result.text)
...
def _repl_unicode(matchobj):
line3 = re.sub('\\\\uffffff','',matchobj.group(0))
line4 = binascii.unhexlify(line3)
return line4
while True:
line2_obj = re.search('((\\\\uffffff[0-9a-f]{2}){2})',line)
if line2_obj is not None:
line2 = line2_obj.group(0)
line3 = re.sub('\\\\uffffff','',line2)
line = re.sub('((\\\\uffffff[0-9a-f]{2}){2})',_repl_unicode,line)
else:
break
...