From 556af306f3d9c531e616d147b7cf8f90b5258693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 2 Sep 2025 22:58:49 +0200 Subject: [PATCH] [hentaifoundry:stories] fix 'src' & 'description' extraction (#8163) --- gallery_dl/extractor/hentaifoundry.py | 5 ++-- test/results/hentaifoundry.py | 42 +++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/hentaifoundry.py b/gallery_dl/extractor/hentaifoundry.py index 91bcd389..a08f7bb8 100644 --- a/gallery_dl/extractor/hentaifoundry.py +++ b/gallery_dl/extractor/hentaifoundry.py @@ -136,8 +136,9 @@ class HentaifoundryExtractor(Extractor): ">" + c + ":", "<").replace(",", "")) data["description"] = text.unescape(extr( - "class='storyDescript'>", "", '
')).replace( + "\r\n", "\n") + path = extr('class="pdfLink" href="', '"') data["src"] = self.root + path data["index"] = text.parse_int(path.rsplit("/", 2)[1]) data["ratings"] = [text.unescape(r) for r in text.extract_iter(extr( diff --git a/test/results/hentaifoundry.py b/test/results/hentaifoundry.py index 780bbdf1..6da50035 100644 --- a/test/results/hentaifoundry.py +++ b/test/results/hentaifoundry.py @@ -202,6 +202,48 @@ Sorry for the bad quality, I made it on after effect because Flash works like sh "words" : int, }, +{ + "#url" : "https://www.hentai-foundry.com/stories/user/Likelymouse", + "#class" : hentaifoundry.HentaifoundryStoriesExtractor, + "#results" : "https://www.hentai-foundry.com/stories/user/Likelymouse/77892/The-Sweater-and-Scarf-Public-Investigators-Part-1.pdf", + + "author" : "Likelymouse", + "chapters" : 4, + "comments" : 0, + "date" : "dt:2025-09-01 00:00:00", + "extension" : "pdf", + "filename" : "The-Sweater-and-Scarf-Public-Investigators-Part-1", + "index" : 77892, + "rating" : 0, + "src" : "https://www.hentai-foundry.com/stories/user/Likelymouse/77892/The-Sweater-and-Scarf-Public-Investigators-Part-1.pdf", + "status" : "Incomplete", + "title" : "The Sweater and Scarf Public Investigators, Part 1", + "user" : "Likelymouse", + "views" : range(100, 10_000), + "words" : 10661, + "description": """\ +
135x240
+
+Cover Page (Made by me)

+Follow 22 y/o Puffy Penelope as she descends into degeneracy, mastering her new found succubi powers.
+

+
MAJOR Kinks include: Exhibitionism and voyeurism, all fours nudity, pet play, cum play, free use, and hyper-sexuality.

+

+
+
+
\ +""", + "ratings" : [ + "Nudity", + "Violence", + "Profanity", + "Sexual content", + "Contains male nudity", + "Contains female nudity", + "Non-consensual/Rape/Forced", + ], +}, + { "#url" : "https://www.hentai-foundry.com/stories/user/SnowWolf35/26416/Overwatch-High-Chapter-Voting-Location", "#category": ("", "hentaifoundry", "story"),