mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/unkn0w7n/calibre
This commit is contained in:
commit
a5eef775dd
@ -48,10 +48,7 @@ class BusinessStandardPrint(BasicNewsRecipe):
|
||||
soup = self.index_to_soup(
|
||||
'https://www.magzter.com/IN/Business-Standard-Private-Ltd/Business-Standard/Newspaper/'
|
||||
)
|
||||
for citem in soup.findAll(
|
||||
'meta', content=lambda s: s and s.endswith('view/3.jpg')
|
||||
):
|
||||
return citem['content']
|
||||
return soup.find('img', id=lambda s: s and 'mgd__lhd__cover' in s.split())['src']
|
||||
|
||||
def parse_index(self):
|
||||
today = datetime.today().strftime('%d-%m-%Y')
|
||||
|
@ -24,10 +24,7 @@ class BusinessLine(BasicNewsRecipe):
|
||||
soup = self.index_to_soup(
|
||||
'https://www.magzter.com/IN/THG-publishing-pvt-ltd/The-Hindu-Business-Line/Newspaper/'
|
||||
)
|
||||
for citem in soup.findAll(
|
||||
'meta', content=lambda s: s and s.endswith('view/3.jpg')
|
||||
):
|
||||
return citem['content']
|
||||
return soup.find('img', id=lambda s: s and 'mgd__lhd__cover' in s.split())['src']
|
||||
|
||||
keep_only_tags = [
|
||||
classes(
|
||||
|
@ -44,5 +44,4 @@ class LiveHindustan(BasicNewsRecipe):
|
||||
|
||||
def get_cover_url(self):
|
||||
soup = self.index_to_soup('https://www.magzter.com/IN/HT-Digital-Streams-Ltd./Hindustan-Times-Hindi-New-Delhi/Newspaper/')
|
||||
for citem in soup.findAll('meta', content=lambda s: s and s.endswith('view/3.jpg')):
|
||||
return citem['content']
|
||||
return soup.find('img', id=lambda s: s and 'mgd__lhd__cover' in s.split())['src']
|
||||
|
@ -51,8 +51,7 @@ class HindustanTimes(BasicNewsRecipe):
|
||||
|
||||
def get_cover_url(self):
|
||||
soup = self.index_to_soup('https://www.magzter.com/IN/HT-Digital-Streams-Ltd./Hindustan-Times-Delhi/Newspaper/')
|
||||
for citem in soup.findAll('meta', content=lambda s: s and s.endswith('view/3.jpg')):
|
||||
return citem['content']
|
||||
return soup.find('img', id=lambda s: s and 'mgd__lhd__cover' in s.split())['src']
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for img in soup.findAll('img', attrs={'data-src': True}):
|
||||
|
@ -22,10 +22,7 @@ class MuyInteresante(BasicNewsRecipe):
|
||||
soup = self.index_to_soup(
|
||||
'https://www.magzter.com/ES/Zinet-Media-Global/Muy-Interesante-Espa%C3%B1a/Science/1806044'
|
||||
)
|
||||
for citem in soup.findAll(
|
||||
'meta', content=lambda s: s and s.endswith('view/3.jpg')
|
||||
):
|
||||
return citem['content']
|
||||
return soup.find('img', id=lambda s: s and 'mgd__lhd__cover' in s.split())['src']
|
||||
|
||||
extra_css = '''
|
||||
.c-detail__bar, .c-detail__author, .c-detail__media__txt { font-size:small; }
|
||||
|
@ -94,5 +94,4 @@ class pcWorld(BasicNewsRecipe):
|
||||
soup = self.index_to_soup(
|
||||
'https://www.magzter.com/US/IDG-Consumer-and-SMB,-Inc./PCWorld/Computer-&-Mobile/'
|
||||
)
|
||||
for citem in soup.findAll('meta', content=lambda s: s and s.endswith('view/3.jpg')):
|
||||
return citem['content']
|
||||
return soup.find('img', id=lambda s: s and 'mgd__lhd__cover' in s.split())['src']
|
||||
|
@ -19,10 +19,7 @@ class RevistaMuyInteresante(BasicNewsRecipe):
|
||||
soup = self.index_to_soup(
|
||||
'https://www.magzter.com/ES/Zinet-Media-Global/Muy-Interesante-Espa%C3%B1a/Science/1806044'
|
||||
)
|
||||
for citem in soup.findAll(
|
||||
'meta', content=lambda s: s and s.endswith('view/3.jpg')
|
||||
):
|
||||
return citem['content']
|
||||
return soup.find('img', id=lambda s: s and 'mgd__lhd__cover' in s.split())['src']
|
||||
|
||||
extra_css = '''
|
||||
.c-detail__bar, .c-detail__author, .c-detail__media__txt { font-size:small; }
|
||||
|
@ -44,10 +44,7 @@ class TheWeek(BasicNewsRecipe):
|
||||
soup = self.index_to_soup(
|
||||
'https://www.magzter.com/IN/Malayala_Manorama/THE_WEEK/Business/'
|
||||
)
|
||||
for citem in soup.findAll(
|
||||
'meta', content=lambda s: s and s.endswith('view/3.jpg')
|
||||
):
|
||||
return citem['content']
|
||||
return soup.find('img', id=lambda s: s and 'mgd__lhd__cover' in s.split())['src']
|
||||
|
||||
def parse_index(self):
|
||||
issue = 'https://www.theweek.in/theweek.html'
|
||||
|
@ -69,8 +69,7 @@ class TheEconomicTimes(BasicNewsRecipe):
|
||||
|
||||
def get_cover_url(self):
|
||||
soup = self.index_to_soup('https://www.magzter.com/IN/Bennett-Coleman-and-Company-Limited/The-Times-of-India-Delhi/Newspaper/')
|
||||
for citem in soup.findAll('meta', content=lambda s: s and s.endswith('view/3.jpg')):
|
||||
return citem['content']
|
||||
return soup.find('img', id=lambda s: s and 'mgd__lhd__cover' in s.split())['src']
|
||||
|
||||
def get_article_url(self, article):
|
||||
rurl = article.get('guid', None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user