From 1b6fcd828dc18d6fe105387653352945a51800c1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 9 Aug 2022 20:20:06 +0200 Subject: Fix old mangakakalot links, such as evil heart --- plugins/manganelo.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'plugins/manganelo.py') 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): -- cgit v1.2.3