mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
pep8
This commit is contained in:
parent
06752c03cc
commit
46ad724b27
@ -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):
|
||||
@ -25,7 +25,7 @@ class ft(BasicNewsRecipe):
|
||||
.article-info__time-byline {font-size:small; font-weight:bold; }
|
||||
.o-topper__visual, #fig, .main-image, .n-content-image { text-align:center; font-size:small; }
|
||||
blockquote, i { color:#5c5c5c; }
|
||||
.o-topper__standfirst { font-weight:bold; color:#202020; }
|
||||
.o-topper__standfirst { font-weight:bold; color:#202020; }
|
||||
.o-topper__topic { font-size:small; color:#5c5c5c; }
|
||||
'''
|
||||
|
||||
@ -35,7 +35,7 @@ class ft(BasicNewsRecipe):
|
||||
),
|
||||
dict(name='article', attrs={'id':'article-body'})
|
||||
]
|
||||
|
||||
|
||||
remove_tags = [
|
||||
dict(name='aside', attrs={'class':'n-content-recommended--single-story'}),
|
||||
classes('in-article-advert')
|
||||
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user