From c095ff2d9b4eff1801a39314f4e1c3bdafb87bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 23 Sep 2025 20:04:58 +0200 Subject: [PATCH] [thehentaiworld] adjust 'type' according to post URL --- gallery_dl/extractor/thehentaiworld.py | 6 ++++-- test/results/thehentaiworld.py | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/thehentaiworld.py b/gallery_dl/extractor/thehentaiworld.py index 01384748..9a306546 100644 --- a/gallery_dl/extractor/thehentaiworld.py +++ b/gallery_dl/extractor/thehentaiworld.py @@ -60,14 +60,16 @@ class ThehentaiworldExtractor(Extractor): "
  • Posted: ", "<"), "%Y-%m-%d"), } - if "/videos/" in url: + if (c := url[27]) == "v": post["type"] = "video" post["width"] = post["height"] = 0 post["votes"] = text.parse_int(extr("(", "")) post["score"] = text.parse_float(extr("", "<")) post["file_url"] = extr('Size: ", " ")) post["height"] = text.parse_int(extr("x ", "<")) post["file_url"] = extr('a href="', '"') diff --git a/test/results/thehentaiworld.py b/test/results/thehentaiworld.py index 4afd650c..fcb3ca0c 100644 --- a/test/results/thehentaiworld.py +++ b/test/results/thehentaiworld.py @@ -177,11 +177,16 @@ __tests__ = ( "#url" : "https://thehentaiworld.com/3d-cgi-hentai-images/ciri-and-shani-cekc-the-witcher-3/", "#class" : thehentaiworld.ThehentaiworldPostExtractor, "#results" : "https://thehentaiworld.com/wp-content/uploads/2025/08/Ciri-and-Shani-CEKC-The-Witcher-3-Hentai-3D-CGI.jpeg", + + "type" : "3d cgi", }, { "#url" : "https://thehentaiworld.com/gif-animated-hentai-images/rangiku-matsumoto-sketchdrif-bleach/", "#class" : thehentaiworld.ThehentaiworldPostExtractor, + "#results" : "https://thehentaiworld.com/wp-content/uploads/2025/05/Rangiku-Matsumoto-Sketchdrif-Bleach-Animated-Hentai.gif", + + "type" : "animated", }, {