mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add cover to Guardian/Observer
This commit is contained in:
parent
5808b696a7
commit
536fb6ff4f
@ -89,6 +89,21 @@ class Guardian(BasicNewsRecipe):
|
|||||||
br = BasicNewsRecipe.get_browser(self, *a, **kw)
|
br = BasicNewsRecipe.get_browser(self, *a, **kw)
|
||||||
return br
|
return br
|
||||||
|
|
||||||
|
def get_cover_url(self):
|
||||||
|
coverdate = date.today()
|
||||||
|
if 'observer' in self.base_url:
|
||||||
|
cover = (
|
||||||
|
'https://www.thepaperboy.com/frontpages/archive/The_Observer_'
|
||||||
|
+ str(coverdate.day) + '_' + str(coverdate.month) + '_'
|
||||||
|
+ str(coverdate.year) + '_400.jpg')
|
||||||
|
else:
|
||||||
|
cover = (
|
||||||
|
'https://www.thepaperboy.com/frontpages/archive/The_Guardian_'
|
||||||
|
+ str(coverdate.day) + '_' + str(coverdate.month) + '_'
|
||||||
|
+ str(coverdate.year) + '_400.jpg')
|
||||||
|
|
||||||
|
return cover
|
||||||
|
|
||||||
def parse_section(self, url, title_prefix=''):
|
def parse_section(self, url, title_prefix=''):
|
||||||
feeds = []
|
feeds = []
|
||||||
soup = self.index_to_soup(url)
|
soup = self.index_to_soup(url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user