mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Remove srcset attribute from images in economist and new york review of books
This commit is contained in:
parent
181f595294
commit
7fd413d392
@ -246,6 +246,8 @@ class Economist(BasicNewsRecipe):
|
||||
yield x
|
||||
|
||||
def postprocess_html(self, soup, first):
|
||||
for img in soup.findAll('img', srcset=True):
|
||||
del img['srcset']
|
||||
for table in list(self.eco_find_image_tables(soup)):
|
||||
caption = table.find('font')
|
||||
img = table.find('img')
|
||||
|
@ -246,6 +246,8 @@ class Economist(BasicNewsRecipe):
|
||||
yield x
|
||||
|
||||
def postprocess_html(self, soup, first):
|
||||
for img in soup.findAll('img', srcset=True):
|
||||
del img['srcset']
|
||||
for table in list(self.eco_find_image_tables(soup)):
|
||||
caption = table.find('font')
|
||||
img = table.find('img')
|
||||
|
@ -66,6 +66,11 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
|
||||
i.extract()
|
||||
return soup
|
||||
|
||||
def postprocess_html(self, soup, first):
|
||||
for img in soup.findAll('img', srcset=True):
|
||||
del img['srcset']
|
||||
return soup
|
||||
|
||||
def parse_index(self):
|
||||
soup = self.index_to_soup('http://www.nybooks.com/current-issue')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user