This commit is contained in:
Kovid Goyal 2024-09-09 11:02:57 +05:30
commit ecf9f7b4cb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -12,7 +12,6 @@ from html5_parser import parse
from lxml import etree from lxml import etree
from calibre import replace_entities from calibre import replace_entities
from calibre.ebooks.BeautifulSoup import BeautifulSoup
from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.web.feeds.news import BasicNewsRecipe, classes
@ -160,6 +159,7 @@ class SCMP(BasicNewsRecipe):
try: try:
load_article_from_json(script[0].text, b_root) load_article_from_json(script[0].text, b_root)
except Exception: except Exception:
self.log('** Failed parse: ', url)
return raw_html return raw_html
head = b_root.xpath('//h2') + b_root.xpath('//h3') head = b_root.xpath('//h2') + b_root.xpath('//h3')
for h2 in head: for h2 in head: