Skip to content

Commit

Permalink
Update The Week
Browse files Browse the repository at this point in the history
fix cover
  • Loading branch information
unkn0w7n committed Apr 12, 2024
1 parent c45b1f8 commit 63060ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions recipes/the_week_magazine_free.recipe
Expand Up @@ -41,8 +41,9 @@ 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 '-cover-' in x['image']:
return 'https://usmagazine.theweek.com' + x['image'][1:]
if 'image' in x:
if '-cover-' in x['image']:
return 'https://usmagazine.theweek.com' + x['image'][1:]

articles_are_obfuscated = True

Expand Down
5 changes: 3 additions & 2 deletions recipes/the_week_uk.recipe
Expand Up @@ -41,8 +41,9 @@ 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 '-cover-' in x['image']:
return 'https://ukmagazine.theweek.com' + x['image'][1:]
if 'image' in x:
if '-cover-' in x['image']:
return 'https://ukmagazine.theweek.com' + x['image'][1:]

articles_are_obfuscated = True

Expand Down

0 comments on commit 63060ff

Please sign in to comment.