This commit is contained in:
Kovid Goyal 2023-09-15 11:21:15 +05:30
parent 06752c03cc
commit 46ad724b27
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -3,7 +3,7 @@ import re
from urllib.parse import quote
from html5_parser import parse
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.web.feeds.news import BasicNewsRecipe, classes
class ft(BasicNewsRecipe):
@ -100,7 +100,7 @@ class ft(BasicNewsRecipe):
# with open('/t/raw.html', 'w') as f:
# f.write(raw)
root = parse(raw)
if x := root.xpath('//article[@id="article-body"]'):
if root.xpath('//article[@id="article-body"]'):
self.log('**has article content')
return raw
self.log('**no article content')