mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
...
This commit is contained in:
parent
8498714848
commit
c52f11532b
@ -16,9 +16,9 @@ class IndiaToday(BasicNewsRecipe):
|
|||||||
masthead_url = 'https://akm-img-a-in.tosshub.com/sites/all/themes/itg/logo.png'
|
masthead_url = 'https://akm-img-a-in.tosshub.com/sites/all/themes/itg/logo.png'
|
||||||
|
|
||||||
def get_cover_url(self):
|
def get_cover_url(self):
|
||||||
soup = self.index_to_soup('https://www.magzter.com/IN/India-Today-Group/India-Today/News/')
|
soup = self.index_to_soup('https://www.readwhere.com/magazine/the-india-today-group/India-Today/1154')
|
||||||
for citem in soup.findAll('meta', content=lambda s: s and s.endswith('view/3.jpg')):
|
for citem in soup.findAll('meta', content=lambda s: s and s.endswith('/magazine/300/new')):
|
||||||
return citem['content']
|
return citem['content'].replace('300', '600')
|
||||||
|
|
||||||
keep_only_tags = [
|
keep_only_tags = [
|
||||||
dict(name='h1'),
|
dict(name='h1'),
|
||||||
|
@ -19,11 +19,11 @@ class OpenMagazine(BasicNewsRecipe):
|
|||||||
extra_css = '[id^="caption-attachment"] {font-size: small;font-style: italic;}'
|
extra_css = '[id^="caption-attachment"] {font-size: small;font-style: italic;}'
|
||||||
|
|
||||||
def get_cover_url(self):
|
def get_cover_url(self):
|
||||||
soup = self.index_to_soup('https://openthemagazine.com/magazine/')
|
soup = self.index_to_soup('https://openthemagazine.com/')
|
||||||
tag = soup.find(attrs={'class': 'mb-2 right-image'})
|
tag = soup.find(attrs={'class': 'magazine-item mr-1'})
|
||||||
if tag:
|
if tag:
|
||||||
self.cover_url = tag.find('img')['src']
|
self.cover_url = tag.find('img')['src']
|
||||||
return super().get_cover_url()
|
return getattr(self, 'cover_url', None)
|
||||||
|
|
||||||
keep_only_tags = [
|
keep_only_tags = [
|
||||||
classes('post-data post-thumb post-meta post-excerp'),
|
classes('post-data post-thumb post-meta post-excerp'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user