forked from openlp/openlp
Improve bibleserver code resiliance
This commit is contained in:
parent
e6ae8d16cb
commit
64367909ba
@ -269,11 +269,12 @@ class BSExtract(object):
|
|||||||
if not soup:
|
if not soup:
|
||||||
return None
|
return None
|
||||||
Receiver.send_message(u'openlp_process_events')
|
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:
|
if not content:
|
||||||
log.exception(u'No verses found in the Bibleserver response.')
|
log.exception(u'No verses found in the Bibleserver response.')
|
||||||
send_error_message(u'parse')
|
send_error_message(u'parse')
|
||||||
return None
|
return None
|
||||||
|
content = content.find(u'div').findAll(u'div')
|
||||||
verse_number = re.compile(r'v(\d{1,2})(\d{3})(\d{3}) verse')
|
verse_number = re.compile(r'v(\d{1,2})(\d{3})(\d{3}) verse')
|
||||||
verses = {}
|
verses = {}
|
||||||
for verse in content:
|
for verse in content:
|
||||||
|
Loading…
Reference in New Issue
Block a user