From 20fbba9d7c54b689397a66a92ce85ad69be9729a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 9 Nov 2022 11:40:27 +0100 Subject: [PATCH] [exhentai] add metadata to search results (#3181) 'gallery_id' and 'gallery_token' --- gallery_dl/extractor/exhentai.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gallery_dl/extractor/exhentai.py b/gallery_dl/extractor/exhentai.py index 10f685e6..a546f684 100644 --- a/gallery_dl/extractor/exhentai.py +++ b/gallery_dl/extractor/exhentai.py @@ -473,6 +473,10 @@ class ExhentaiSearchExtractor(ExhentaiExtractor): "pattern": ExhentaiGalleryExtractor.pattern, "range": "1-30", "count": 30, + "keyword": { + "gallery_id": int, + "gallery_token": r"re:^[0-9a-f]{10}$" + }, }), ) @@ -508,6 +512,8 @@ class ExhentaiSearchExtractor(ExhentaiExtractor): if url == last: continue last = url + data["gallery_id"] = text.parse_int(gallery.group(2)) + data["gallery_token"] = gallery.group(3) yield Message.Queue, url + "/", data next_url = text.extr(page, 'nexturl = "', '"', None)