From c85adbdc9dc2f3fc39c4f0adab095fab2c26231a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 13 Nov 2016 21:19:18 +0100 Subject: [PATCH] [mangamint] code simplifications --- gallery_dl/extractor/mangamint.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/gallery_dl/extractor/mangamint.py b/gallery_dl/extractor/mangamint.py index 48950034..6eb4b069 100644 --- a/gallery_dl/extractor/mangamint.py +++ b/gallery_dl/extractor/mangamint.py @@ -70,8 +70,7 @@ class MangamintChapterExtractor(Extractor): data["count"] = len(imgs) yield Message.Version, 1 yield Message.Directory, data - for num, url in enumerate(imgs, 1): - data["page"] = num + for data["page"], url in enumerate(imgs, 1): yield Message.Url, url, text.nameext_from_url(url, data) def get_job_metadata(self, page): @@ -84,7 +83,6 @@ class MangamintChapterExtractor(Extractor): "chapter": match.group(2), "chapter-minor": match.group(3) or "", "chapter-id": chid, - # "title": "", "lang": "en", "language": "English", } @@ -102,10 +100,4 @@ class MangamintChapterExtractor(Extractor): params["form_build_id"], pos = text.extract(page, 'value="', '"', pos) url = "https://www.mangamint.com/many/callback" page = self.request(url, method="post", data=params).json()["data"] - imgs = [] - pos = 0 - while True: - url, pos = text.extract(page, r'