mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Update indian_express.recipe
fix cover
This commit is contained in:
parent
99d53aa6fc
commit
ffc7bbc708
@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
# vim:fileencoding=utf-8
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from calibre.utils.date import parse_date
|
||||
@ -116,10 +118,10 @@ class IndianExpress(BasicNewsRecipe):
|
||||
|
||||
def get_cover_url(self):
|
||||
soup = self.index_to_soup(
|
||||
'https://www.magzter.com/IN/The-Indian-Express-Ltd./The-Indian-Express-Mumbai/Newspaper/'
|
||||
'https://www.readwhere.com/newspaper/indian-express/Nagpur/38726'
|
||||
)
|
||||
for citem in soup.findAll('meta', content=lambda s: s and s.endswith('view/3.jpg')):
|
||||
return citem['content']
|
||||
citem = soup.find('meta', attrs={'property':'og:image'})
|
||||
return citem['content'].replace('300', '600')
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
if h2 := soup.find('h2'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user