This commit is contained in:
Kovid Goyal 2024-04-13 08:51:58 +05:30
commit b6812939c9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 4 deletions

View File

@ -41,6 +41,7 @@ class TheWeek(BasicNewsRecipe):
url = 'https://usmagazine.theweek.com/timelines.json'
data = json.loads(self.index_to_soup(url, raw=True))
for x in data['timelines'][:5]:
if 'image' in x:
if '-cover-' in x['image']:
return 'https://usmagazine.theweek.com' + x['image'][1:]

View File

@ -41,6 +41,7 @@ class TheWeek(BasicNewsRecipe):
url = 'https://ukmagazine.theweek.com/timelines.json'
data = json.loads(self.index_to_soup(url, raw=True))
for x in data['timelines'][:5]:
if 'image' in x:
if '-cover-' in x['image']:
return 'https://ukmagazine.theweek.com' + x['image'][1:]