This commit is contained in:
parent
0ff28d36bd
commit
594f59529b
6
books.py
6
books.py
@ -53,6 +53,12 @@ class MyChapter(Chapter):
|
||||
# return new element-tree
|
||||
return etree
|
||||
|
||||
def replace_images(self, image_dir: str, timeout: int = 10):
|
||||
super().replace_images(image_dir, timeout)
|
||||
for img in self.etree.xpath(".//img"):
|
||||
if img.attrib["src"].startswith("http"):
|
||||
img.getparent().remove(img)
|
||||
|
||||
|
||||
def async_wrap(func):
|
||||
@wraps(func)
|
||||
|
Reference in New Issue
Block a user