BeautifulSoup unescapes HTML for you

This commit is contained in:
Luke Rogers 2012-09-06 14:11:49 +12:00
parent 03b4ad4239
commit 72b7c3ed2d

View file

@ -10,7 +10,6 @@ def refresh_cache():
for e in soup.find_all('div', {'class': 'post article'}):
id = int(e['id'])
text = ''.join(e.find('p').find_all(text=True))
text = http.unescape(text)
fml_cache.append((id, text))
# do an initial refresh of the cache