mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
...
This commit is contained in:
parent
4f21f06f76
commit
348e88abd8
@ -556,7 +556,11 @@ class BasicNewsRecipe(Recipe):
|
||||
article_html = doc.summary()
|
||||
extracted_title = doc.title()
|
||||
|
||||
frag = fragment_fromstring(article_html)
|
||||
try:
|
||||
frag = fragment_fromstring(article_html)
|
||||
except:
|
||||
doc = document_fromstring(article_html)
|
||||
frag = doc.xpath('//body')[-1]
|
||||
if frag.tag == 'html':
|
||||
root = frag
|
||||
elif frag.tag == 'body':
|
||||
|
Loading…
x
Reference in New Issue
Block a user