This commit is contained in:
Kovid Goyal 2023-11-06 13:58:57 +05:30
commit 64289d3260
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 12 additions and 0 deletions

View File

@ -44,6 +44,10 @@ class ft(BasicNewsRecipe):
classes('in-article-advert')
]
def get_cover_url(self):
soup = self.index_to_soup('https://www.frontpages.com/financial-times/')
return 'https://www.frontpages.com' + soup.find('img', attrs={'id':'giornale-img'})['src']
# needs_subscription = 'optional'
#
# def get_browser(self, *args, **kw):

View File

@ -55,6 +55,10 @@ class WSJ(BasicNewsRecipe):
.sub, em, i { color: #202020; }
'''
def get_cover_url(self):
soup = self.index_to_soup('https://www.frontpages.com/the-wall-street-journal/')
return 'https://www.frontpages.com' + soup.find('img', attrs={'id':'giornale-img'})['src']
keep_only_tags = [
dict(name=['h1', 'h2']),
dict(attrs={'aria-describedby':'big-top-caption'}),

View File

@ -55,6 +55,10 @@ class WSJ(BasicNewsRecipe):
.sub, em, i { color: #202020; }
'''
def get_cover_url(self):
soup = self.index_to_soup('https://www.frontpages.com/the-wall-street-journal/')
return 'https://www.frontpages.com' + soup.find('img', attrs={'id':'giornale-img'})['src']
keep_only_tags = [
dict(name=['h1', 'h2']),
dict(attrs={'aria-describedby':'big-top-caption'}),