This commit is contained in:
Kovid Goyal 2025-06-19 16:54:23 +05:30
parent 57a645e503
commit 6092dcda65
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 7 additions and 7 deletions

View File

@ -64,11 +64,11 @@ class ft(BasicNewsRecipe):
] ]
def get_cover_url(self): def get_cover_url(self):
url = f"https://www.tomorrowspapers.co.uk/financial-times-front-page-{date.today():%Y-%m-%d}/" url = f'https://www.tomorrowspapers.co.uk/financial-times-front-page-{date.today():%Y-%m-%d}/'
try: try:
soup = self.index_to_soup(url) soup = self.index_to_soup(url)
except Exception: except Exception:
return f"https://img.kiosko.net/{date.today():%Y/%m/%d}/uk/ft_uk.750.jpg" return f'https://img.kiosko.net/{date.today():%Y/%m/%d}/uk/ft_uk.750.jpg'
img = soup.select_one('img.attachment-full[src*="Financial-Times"]') img = soup.select_one('img.attachment-full[src*="Financial-Times"]')
src = img['src'] src = img['src']
return src return src

View File

@ -6,8 +6,8 @@ from itertools import zip_longest
from urllib.parse import quote, urlencode from urllib.parse import quote, urlencode
from calibre import browser from calibre import browser
from calibre.ptempfile import PersistentTemporaryFile
from calibre.ebooks.BeautifulSoup import BeautifulSoup from calibre.ebooks.BeautifulSoup import BeautifulSoup
from calibre.ptempfile import PersistentTemporaryFile
from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.web.feeds.news import BasicNewsRecipe, classes
@ -35,7 +35,7 @@ class WSJ(BasicNewsRecipe):
description = ( description = (
'The Print Edition of WSJ. The Wall Street Journal is your source ' 'The Print Edition of WSJ. The Wall Street Journal is your source '
'for breaking news, analysis and insights from the U.S. and ' 'for breaking news, analysis and insights from the U.S. and '
'around the world, the world\'s leading business and finance publication.' "around the world, the world's leading business and finance publication."
) )
language = 'en_US' language = 'en_US'
masthead_url = 'https://s.wsj.net/media/wsj_amp_masthead_lg.png' masthead_url = 'https://s.wsj.net/media/wsj_amp_masthead_lg.png'

View File

@ -5,8 +5,8 @@ from itertools import zip_longest
from urllib.parse import quote, urlencode from urllib.parse import quote, urlencode
from calibre import browser from calibre import browser
from calibre.ptempfile import PersistentTemporaryFile
from calibre.ebooks.BeautifulSoup import BeautifulSoup from calibre.ebooks.BeautifulSoup import BeautifulSoup
from calibre.ptempfile import PersistentTemporaryFile
from calibre.web.feeds.news import BasicNewsRecipe, classes from calibre.web.feeds.news import BasicNewsRecipe, classes