Update Financial Times

Fixes #1587578 [Update to financial times recipes](https://bugs.launchpad.net/calibre/+bug/1587578)
This commit is contained in:
Kovid Goyal 2016-06-01 05:02:29 +05:30
parent 57450e54e6
commit f4b6ca4b27
2 changed files with 14 additions and 3 deletions

View File

@ -40,7 +40,12 @@ class FinancialTimes(BasicNewsRecipe):
br.submit() br.submit()
return br return br
keep_only_tags = [dict(name='div', attrs={'class':['fullstory fullstoryHeader','fullstory fullstoryBody','ft-story-header','ft-story-body','index-detail']})] keep_only_tags = [
dict(name='p' , attrs={'class':lambda x: x and 'lastUpdated' in x.split()}),
dict(name='div', attrs={'class':lambda x: x and 'syndicationHeadline' in x.split()}),
dict(name='p' , attrs={'class':lambda x: x and 'byline' in x.split()}),
dict(name='div', attrs={'class':['fullstory fullstoryBody','ft-story-header','ft-story-body','index-detail']})
]
remove_tags = [ remove_tags = [
dict(name='style', attrs={'id':'antiClickjack'}), dict(name='style', attrs={'id':'antiClickjack'}),
dict(name='div', attrs={'id':'floating-con'}), dict(name='div', attrs={'id':'floating-con'}),

View File

@ -49,9 +49,15 @@ class FinancialTimes(BasicNewsRecipe):
br.submit() br.submit()
return br return br
keep_only_tags = [dict(name='div', attrs={'class':['fullstory fullstoryHeader','fullstory fullstoryBody','ft-story-header','ft-story-body','index-detail']})] keep_only_tags = [
dict(name='p' , attrs={'class':lambda x: x and 'lastUpdated' in x.split()}),
dict(name='div', attrs={'class':lambda x: x and 'syndicationHeadline' in x.split()}),
dict(name='p' , attrs={'class':lambda x: x and 'byline' in x.split()}),
dict(name='div', attrs={'class':['fullstory fullstoryBody','ft-story-header','ft-story-body','index-detail']})
]
remove_tags = [ remove_tags = [
dict(name='div', attrs={'id':'floating-con'}) dict(name='style', attrs={'id':'antiClickjack'})
,dict(name='div', attrs={'id':'floating-con'})
,dict(name=['meta','iframe','base','object','embed','link']) ,dict(name=['meta','iframe','base','object','embed','link'])
,dict(attrs={'class':['storyTools','story-package','screen-copy','story-package separator','expandable-image','promobox']}) ,dict(attrs={'class':['storyTools','story-package','screen-copy','story-package separator','expandable-image','promobox']})
,dict(name='div', attrs={'class':lambda x: x and 'insideArticleRelatedTopics' in x.split()}) ,dict(name='div', attrs={'class':lambda x: x and 'insideArticleRelatedTopics' in x.split()})