wsj - get cover

This commit is contained in:
unkn0w7n 2023-11-06 13:16:35 +05:30
parent ca1a05ce43
commit 97959c7eef
2 changed files with 8 additions and 0 deletions

View File

@ -55,6 +55,10 @@ class WSJ(BasicNewsRecipe):
.sub, em, i { color: #202020; } .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 = [ keep_only_tags = [
dict(name=['h1', 'h2']), dict(name=['h1', 'h2']),
dict(attrs={'aria-describedby':'big-top-caption'}), dict(attrs={'aria-describedby':'big-top-caption'}),

View File

@ -55,6 +55,10 @@ class WSJ(BasicNewsRecipe):
.sub, em, i { color: #202020; } .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 = [ keep_only_tags = [
dict(name=['h1', 'h2']), dict(name=['h1', 'h2']),
dict(attrs={'aria-describedby':'big-top-caption'}), dict(attrs={'aria-describedby':'big-top-caption'}),