diff --git a/recipes/financial_times.recipe b/recipes/financial_times.recipe index d22ea83553..45f2f1701c 100644 --- a/recipes/financial_times.recipe +++ b/recipes/financial_times.recipe @@ -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')