mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -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
|
yield x
|
||||||
|
|
||||||
def postprocess_html(self, soup, first):
|
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)):
|
for table in list(self.eco_find_image_tables(soup)):
|
||||||
caption = table.find('font')
|
caption = table.find('font')
|
||||||
img = table.find('img')
|
img = table.find('img')
|
||||||
|
@ -246,6 +246,8 @@ class Economist(BasicNewsRecipe):
|
|||||||
yield x
|
yield x
|
||||||
|
|
||||||
def postprocess_html(self, soup, first):
|
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)):
|
for table in list(self.eco_find_image_tables(soup)):
|
||||||
caption = table.find('font')
|
caption = table.find('font')
|
||||||
img = table.find('img')
|
img = table.find('img')
|
||||||
|
@ -66,6 +66,11 @@ class NewYorkReviewOfBooks(BasicNewsRecipe):
|
|||||||
i.extract()
|
i.extract()
|
||||||
return soup
|
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):
|
def parse_index(self):
|
||||||
soup = self.index_to_soup('http://www.nybooks.com/current-issue')
|
soup = self.index_to_soup('http://www.nybooks.com/current-issue')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user