Fix BibleGateway xrefs (Bug #700271)

This commit is contained in:
Jon Tibble 2011-01-08 18:50:06 +00:00
parent 70f18fdfa4
commit dbfd7796ba

View File

@ -231,6 +231,9 @@ class BGExtract(object):
footnotes = soup.findAll(u'sup', u'footnote')
if footnotes:
[footnote.extract() for footnote in footnotes]
crossrefs = soup.findAll(u'sup', u'xref')
if crossrefs:
[crossref.extract() for crossref in crossrefs]
cleanup = [(re.compile('\s+'), lambda match: ' ')]
verses = BeautifulSoup(str(soup), markupMassage=cleanup)
content = verses.find(u'div', u'result-text-style-normal')