From eb2bb7d998b28f4e3f178bd956ce5d2f220637f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orkun=20Ko=C3=A7yi=C4=9Fit?= Date: Wed, 9 Mar 2022 00:06:41 +0300 Subject: [PATCH] [fantia] add 'num' enumeration index (#2377) * Adding numerical ordering to fantia * Fixed line to fit PEP8 line size limit --- gallery_dl/extractor/fantia.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gallery_dl/extractor/fantia.py b/gallery_dl/extractor/fantia.py index 89a965fa..9c33073c 100644 --- a/gallery_dl/extractor/fantia.py +++ b/gallery_dl/extractor/fantia.py @@ -29,7 +29,9 @@ class FantiaExtractor(Extractor): for post_id in self.posts(): full_response, post = self._get_post_data(post_id) yield Message.Directory, post + post["num"] = 0 for url, url_data in self._get_urls_from_post(full_response, post): + post["num"] += 1 fname = url_data["content_filename"] or url text.nameext_from_url(fname, url_data) url_data["file_url"] = url