diff --git a/openlp/plugins/bibles/lib/http.py b/openlp/plugins/bibles/lib/http.py index 2476ae65d..da3a1e9e5 100644 --- a/openlp/plugins/bibles/lib/http.py +++ b/openlp/plugins/bibles/lib/http.py @@ -208,7 +208,8 @@ class BGExtract(object): u'version': u'%s' % version}) cleaner = [(re.compile(' |
|\'\+\''), lambda match: '')] soup = get_soup_for_bible_ref( - u'http://www.biblegateway.com/passage/?%s' % url_params, cleaner) + u'http://www.biblegateway.com/passage/?%s' % url_params, + cleaner=cleaner) if not soup: return None Receiver.send_message(u'openlp_process_events') @@ -269,11 +270,12 @@ class BSExtract(object): if not soup: return None Receiver.send_message(u'openlp_process_events') - content = soup.find(u'div', u'content').find(u'div').findAll(u'div') + content = soup.find(u'div', u'content') if not content: log.exception(u'No verses found in the Bibleserver response.') send_error_message(u'parse') return None + content = content.find(u'div').findAll(u'div') verse_number = re.compile(r'v(\d{1,2})(\d{3})(\d{3}) verse') verses = {} for verse in content: