~alisonken1/openlp/pjlink2-i

« back to all changes in this revision

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

  • Committer: Tim Bentley
  • Author(s): Phill
  • Date: 2017-08-11 20:31:09 UTC
  • mfrom: (2754.1.11 pathlib2)
  • Revision ID: tim.bentley@gmail.com-20170811203109-0idjanfltutf8n38
Definitely ready for merging, unless, of course you guys find some more issues!

Part 2

Changed the pathedit widget over to using pathlib
Added a 'patched' file dialog
Added a few utility methods

lp:~phill-ridout/openlp/pathlib2 (revision 2763)
[SUCCESS] https://ci.openlp.io/job/Branch-01-Pull/2125/
[SUCCESS] https://ci.openlp.io/job/Branch-02-Functional-Tests/2033/
[SUCCESS] https://ci.openlp.io/job/Branch-03-Interface-Tests/1938/
[SUCCESS] https://ci.openlp.io/job/Branch-04a-Code_Analysis...

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
                                                                        chapter=chapter,
256
256
                                                                        version=version)
257
257
        soup = get_soup_for_bible_ref(
258
 
            'http://biblegateway.com/passage/?{url}'.format(url=url_params),
 
258
            'http://www.biblegateway.com/passage/?{url}'.format(url=url_params),
259
259
            pre_parse_regex=r'<meta name.*?/>', pre_parse_substitute='')
260
260
        if not soup:
261
261
            return None
284
284
        """
285
285
        log.debug('BGExtract.get_books_from_http("{version}")'.format(version=version))
286
286
        url_params = urllib.parse.urlencode({'action': 'getVersionInfo', 'vid': '{version}'.format(version=version)})
287
 
        reference_url = 'http://biblegateway.com/versions/?{url}#books'.format(url=url_params)
 
287
        reference_url = 'http://www.biblegateway.com/versions/?{url}#books'.format(url=url_params)
288
288
        page = get_web_page(reference_url)
289
289
        if not page:
290
290
            send_error_message('download')