aboutsummaryrefslogtreecommitdiff
path: root/plugins/manganelo.py
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-08-09 20:20:06 +0200
committerdec05eba <dec05eba@protonmail.com>2022-08-09 20:20:06 +0200
commit1b6fcd828dc18d6fe105387653352945a51800c1 (patch)
tree8601db90198e84ab703fc27676df074ffe51f213 /plugins/manganelo.py
parent2d1bdbf0cb274118f06dfa501fb77ecf0e5cb57a (diff)
Fix old mangakakalot links, such as evil heart
Diffstat (limited to 'plugins/manganelo.py')
-rwxr-xr-xplugins/manganelo.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/manganelo.py b/plugins/manganelo.py
index 4427334..5593fd4 100755
--- a/plugins/manganelo.py
+++ b/plugins/manganelo.py
@@ -121,12 +121,21 @@ def list_chapters(url, chapter_list_input):
tree = redirect_migrated_url(url, tree, False)
chapters = []
+
for element in tree.xpath('//ul[@class="row-content-chapter"]//a'):
element_text = element.text.strip().replace("/", "_")
url = element.attrib.get("href").strip()
if element_text.lower().replace(" ", "") in seen_titles or url in seen_urls:
break
chapters.append({ "name": element_text, "url": url })
+
+ for element in tree.xpath('//div[@class="chapter-list"]//a'):
+ element_text = element.text.strip().replace("/", "_")
+ url = element.attrib.get("href").strip()
+ if element_text.lower().replace(" ", "") in seen_titles or url in seen_urls:
+ break
+ chapters.append({ "name": element_text, "url": url })
+
print(json.dumps(chapters))
def download_chapter(url, download_dir):