Cleanup refactor

This commit is contained in:
Jon Tibble 2010-07-23 16:25:54 +01:00
parent e9edb0c7a4
commit 1ea37f8d77

View File

@ -207,12 +207,11 @@ class BGExtract(BibleCommon):
text = str(soup.find(u'div', u'result-text-style-normal'))
useful_soup = BeautifulSoup(text)
verses = useful_soup.findAll(u'p')
verses.pop(0)
verses.pop()
verse_list = {}
for verse in verses:
verse_list[int(str(verse.sup.contents[0]))] = \
unicode(verse.contents[2])
if verse.sup:
verse_list[int(str(verse.sup.contents[0]))] = \
unicode(verse.contents[2])
return SearchResults(bookname, chapter, verse_list)
class CWExtract(BibleCommon):