mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-29 16:15:55 +01:00
Correct local links to images
This commit is contained in:
parent
1e699453f7
commit
6da24d32a0
1 changed files with 8 additions and 0 deletions
|
|
@ -235,6 +235,14 @@ def parse_index(self):
|
|||
|
||||
return self.page_index
|
||||
|
||||
|
||||
def postprocess_html(self, soup, first):
|
||||
for figure in soup.findAll('a', attrs = {'href' : lambda x: x and ('jpg' in x or 'png' in x or 'gif' in x)}):
|
||||
# makes sure that the link points to the absolute web address
|
||||
if figure['href'].startswith('/'):
|
||||
figure['href'] = self.fix_url(figure['href'])
|
||||
return soup
|
||||
|
||||
def postprocess_book(self, oeb, opts, log):
|
||||
m = oeb.metadata
|
||||
m.clear('title')
|
||||
|
|
|
|||
Loading…
Reference in a new issue