mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
NY Review of Books
This commit is contained in:
parent
c0f1f6670d
commit
d1f8cd255a
@ -62,7 +62,7 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
|
|||||||
# Find cover
|
# Find cover
|
||||||
cover = soup.find('img', attrs={'class':'border-light-gray'})
|
cover = soup.find('img', attrs={'class':'border-light-gray'})
|
||||||
if cover is not None:
|
if cover is not None:
|
||||||
self.cover_url = absurl(cover['src'])
|
self.cover_url = absurl(cover['data-lazy-src'])
|
||||||
self.log('Found cover at:', self.cover_url)
|
self.log('Found cover at:', self.cover_url)
|
||||||
|
|
||||||
# Find date
|
# Find date
|
||||||
@ -91,3 +91,8 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
|
|||||||
'description': desc})
|
'description': desc})
|
||||||
|
|
||||||
return [('Current Issue', articles)]
|
return [('Current Issue', articles)]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
for img in soup.findAll('img', attrs={'data-lazy-src':True}):
|
||||||
|
img['src'] = img['data-lazy-src']
|
||||||
|
return soup
|
||||||
|
@ -52,7 +52,7 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
|
|||||||
# Find cover
|
# Find cover
|
||||||
cover = soup.find('img', attrs={'class':'border-light-gray'})
|
cover = soup.find('img', attrs={'class':'border-light-gray'})
|
||||||
if cover is not None:
|
if cover is not None:
|
||||||
self.cover_url = absurl(cover['src'])
|
self.cover_url = absurl(cover['data-lazy-src'])
|
||||||
self.log('Found cover at:', self.cover_url)
|
self.log('Found cover at:', self.cover_url)
|
||||||
|
|
||||||
# Find date
|
# Find date
|
||||||
@ -81,3 +81,8 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
|
|||||||
'description': desc})
|
'description': desc})
|
||||||
|
|
||||||
return [('Current Issue', articles)]
|
return [('Current Issue', articles)]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
for img in soup.findAll('img', attrs={'data-lazy-src':True}):
|
||||||
|
img['src'] = img['data-lazy-src']
|
||||||
|
return soup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user