This commit is contained in:
unkn0w7n 2024-09-09 10:56:00 +05:30
parent dcfb0e15ed
commit c1b08e955c

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: