mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update financial_times.recipe
add alt cover.
This commit is contained in:
parent
9c43f54537
commit
7de4aa862c
@ -65,7 +65,10 @@ 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:
|
||||||
soup = self.index_to_soup(url)
|
soup = self.index_to_soup(url)
|
||||||
|
except Exception:
|
||||||
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user