make the images relative to the content rather than to the assets
check 9780596800611 for example
This commit is contained in:
parent
df0fd8e064
commit
4a5658791c
1 changed files with 3 additions and 2 deletions
|
|
@ -814,7 +814,7 @@ class SafariBooks:
|
||||||
|
|
||||||
# Images
|
# Images
|
||||||
if "images" in next_chapter and len(next_chapter["images"]):
|
if "images" in next_chapter and len(next_chapter["images"]):
|
||||||
self.images.extend(urljoin(next_chapter['asset_base_url'], img_url)
|
self.images.extend(urljoin(next_chapter['content'], img_url)
|
||||||
for img_url in next_chapter['images'])
|
for img_url in next_chapter['images'])
|
||||||
|
|
||||||
# Stylesheets
|
# Stylesheets
|
||||||
|
|
@ -863,6 +863,7 @@ class SafariBooks:
|
||||||
self.css_done_queue.put(1)
|
self.css_done_queue.put(1)
|
||||||
self.display.state(len(self.css), self.css_done_queue.qsize())
|
self.display.state(len(self.css), self.css_done_queue.qsize())
|
||||||
|
|
||||||
|
|
||||||
def _thread_download_images(self, url):
|
def _thread_download_images(self, url):
|
||||||
image_name = url.split("/")[-1]
|
image_name = url.split("/")[-1]
|
||||||
image_path = os.path.join(self.images_path, image_name)
|
image_path = os.path.join(self.images_path, image_name)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue