mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Retrieve the latest magazine cover's thumbnail to use as the cover
This commit is contained in:
parent
1ec001d53d
commit
79a88546f0
@ -107,3 +107,12 @@ class WiredDailyNews(BasicNewsRecipe):
|
||||
|
||||
magazine_year_month = self.get_magazine_year_month('.')
|
||||
return [('Magazine-' + magazine_year_month, articles)]
|
||||
|
||||
def get_cover_url(self):
|
||||
'''
|
||||
get the most recent magazine cover
|
||||
:return: url
|
||||
'''
|
||||
soup = self.index_to_soup('https://www.wired.com/category/magazine/')
|
||||
return soup.find(id='mag-card').find('img').get('src')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user