From 7de4aa862cc2294fe4be7c78b2682a0b35e3df3a Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Thu, 29 May 2025 19:04:39 +0530 Subject: [PATCH] Update financial_times.recipe add alt cover. --- recipes/financial_times.recipe | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/financial_times.recipe b/recipes/financial_times.recipe index d7f320f1d3..89894093df 100644 --- a/recipes/financial_times.recipe +++ b/recipes/financial_times.recipe @@ -65,7 +65,10 @@ class ft(BasicNewsRecipe): def get_cover_url(self): url = f"https://www.tomorrowspapers.co.uk/financial-times-front-page-{date.today():%Y-%m-%d}/" - soup = self.index_to_soup(url) + try: + 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"]') src = img['src'] return src