[thehentaiworld] support '/gif-animated-hentai-images/' URLs (#8277)
generalize 'post' URL pattern
This commit is contained in:
@@ -109,16 +109,6 @@ class ThehentaiworldExtractor(Extractor):
|
||||
pnum += 1
|
||||
|
||||
|
||||
class ThehentaiworldPostExtractor(ThehentaiworldExtractor):
|
||||
subcategory = "post"
|
||||
pattern = (rf"{BASE_PATTERN}"
|
||||
rf"(/(?:(?:3d-cgi-)?hentai-image|video)s/([^/?#]+))")
|
||||
example = "https://thehentaiworld.com/hentai-images/SLUG/"
|
||||
|
||||
def posts(self):
|
||||
return (f"{self.root}{self.groups[0]}/",)
|
||||
|
||||
|
||||
class ThehentaiworldTagExtractor(ThehentaiworldExtractor):
|
||||
subcategory = "tag"
|
||||
per_page = 24
|
||||
@@ -137,3 +127,13 @@ class ThehentaiworldTagExtractor(ThehentaiworldExtractor):
|
||||
self.page_start += pages
|
||||
self.post_start += posts
|
||||
return num
|
||||
|
||||
|
||||
class ThehentaiworldPostExtractor(ThehentaiworldExtractor):
|
||||
subcategory = "post"
|
||||
pattern = (rf"{BASE_PATTERN}("
|
||||
rf"/(?:video|(?:[\w-]+-)?hentai-image)s/([^/?#]+))")
|
||||
example = "https://thehentaiworld.com/hentai-images/SLUG/"
|
||||
|
||||
def posts(self):
|
||||
return (f"{self.root}{self.groups[0]}/",)
|
||||
|
||||
@@ -179,6 +179,11 @@ __tests__ = (
|
||||
"#results" : "https://thehentaiworld.com/wp-content/uploads/2025/08/Ciri-and-Shani-CEKC-The-Witcher-3-Hentai-3D-CGI.jpeg",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://thehentaiworld.com/gif-animated-hentai-images/rangiku-matsumoto-sketchdrif-bleach/",
|
||||
"#class" : thehentaiworld.ThehentaiworldPostExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://thehentaiworld.com/tag/aurahack/",
|
||||
"#class" : thehentaiworld.ThehentaiworldTagExtractor,
|
||||
|
||||
Reference in New Issue
Block a user