mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-24 15:53:31 +01:00
Remove srcset attribute from images in economist and new york review of books
This commit is contained in:
parent
181f595294
commit
7fd413d392
3 changed files with 9 additions and 0 deletions
|
|
@ -246,6 +246,8 @@ def eco_find_image_tables(self, soup):
|
|||
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 @@ def eco_find_image_tables(self, soup):
|
|||
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 @@ def preprocess_html(self, soup):
|
|||
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…
Reference in a new issue