~wgrant/openlp/openlyrics_test

« back to all changes in this revision

Viewing changes to openlp/plugins/bibles/lib/http.py

  • Committer: Martin Zibricky
  • Date: 2011-10-06 16:16:29 UTC
  • mfrom: (1186.2.584 openlp)
  • Revision ID: mzibr.public@gmail.com-20111006161629-17tyvvq60h3h15dd
[merge] r1770, rename testing dir to tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
        Receiver.send_message(u'openlp_process_events')
83
83
        footnotes = soup.findAll(u'sup', u'footnote')
84
84
        if footnotes:
85
 
            [footnote.extract() for footnote in footnotes]
 
85
            for footnote in footnotes:
 
86
                footnote.extract()
86
87
        crossrefs = soup.findAll(u'sup', u'xref')
87
88
        if crossrefs:
88
 
            [crossref.extract() for crossref in crossrefs]
 
89
            for crossref in crossrefs:
 
90
                crossref.extract()
89
91
        headings = soup.findAll(u'h5')
90
92
        if headings:
91
 
            [heading.extract() for heading in headings]
 
93
            for heading in headings:
 
94
                heading.extract()
92
95
        cleanup = [(re.compile('\s+'), lambda match: ' ')]
93
96
        verses = BeautifulSoup(str(soup), markupMassage=cleanup)
94
97
        verse_list = {}