1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-26 12:42:29 +01:00

[hentaifoundry] fix '.swf' file downloads (#4641)

This commit is contained in:
Mike Fährmann 2023-10-09 11:44:14 +02:00
parent 15f940819b
commit 9a008523ac
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 55 additions and 5 deletions

View File

@ -72,13 +72,11 @@ class HentaifoundryExtractor(Extractor):
extr = text.extract_from(page, page.index('id="picBox"'))
data = {
"index" : text.parse_int(path.rsplit("/", 2)[1]),
"title" : text.unescape(extr('class="imageTitle">', '<')),
"artist" : text.unescape(extr('/profile">', '<')),
"width" : text.parse_int(extr('width="', '"')),
"height" : text.parse_int(extr('height="', '"')),
"index" : text.parse_int(path.rsplit("/", 2)[1]),
"src" : text.urljoin(self.root, text.unescape(extr(
'src="', '"'))),
"_body" : extr(
'<div class="boxbody"', '<div class="boxfooter"'),
"description": text.unescape(text.remove_html(extr(
'>Description</div>', '</section>')
.replace("\r\n", "\n"), "", "")),
@ -92,6 +90,20 @@ class HentaifoundryExtractor(Extractor):
">Tags </span>", "</div>")),
}
body = data["_body"]
if "<object " in body:
data["src"] = text.urljoin(self.root, text.unescape(text.extr(
body, 'name="movie" value="', '"')))
data["width"] = text.parse_int(text.extr(
body, "name='width' value='", "'"))
data["height"] = text.parse_int(text.extr(
body, "name='height' value='", "'"))
else:
data["src"] = text.urljoin(self.root, text.unescape(text.extr(
body, 'src="', '"')))
data["width"] = text.parse_int(text.extr(body, 'width="', '"'))
data["height"] = text.parse_int(text.extr(body, 'height="', '"'))
return text.nameext_from_url(data["src"], data)
def _parse_story(self, html):

View File

@ -100,6 +100,44 @@ __tests__ = (
"width" : 495,
},
{
"#url" : "https://www.hentai-foundry.com/pictures/user/suuxe/161533/ANIMATION-of-Insane-Black-Rock-Shooter-FAN-ART",
"#comment" : "SWF / rumble embed (#4641)",
"#category": ("", "hentaifoundry", "image"),
"#class" : hentaifoundry.HentaifoundryImageExtractor,
"#urls" : "https://pictures.hentai-foundry.com/s/suuxe/161533/suuxe-161533-ANIMATION_of_Insane_Black_Rock_Shooter_FAN_ART.swf",
"artist" : "suuxe",
"date" : "dt:2012-09-15 09:50:45",
"description": "Here is one of my fav drawings I have made NOW with ANIMATIONS! \"yay\" \n\nTook me ages to get this animation to right size because when I was rendering it out from after effects it crop the freaking drawing so it would be \"widescreen\" for some reason after effects wants that but I was able to \"fix it\" by making it believe the whole drawing was widescreen while the drawing was in the corner then I crop it in flash to get the right size I am soooo smart mohahahaha.....!\n\nYou can also find it on my deviantart site:\nhttp://suuxe.deviantart.com/art/ANIMATION-of-Insane-Black-Rock-Shooter-FAN-ART-327072898\n\nUPDATE:\n-Her left arm moves\n-\"Eye flame\" glow is stronger\n-Fire sparkle on the eye flame\n-Rain animations are more visible now\n-Front mist animation also moves around\n-Sparkle animation down left is more visible now\n-Changed the color on the flying dust so it looks more like flame/glow\n\nOld animations made in After Effects:\n-Fire sparkle thingy down left \n-Two layers of rain \n-Glow on her left eye \n-Four layers of mist \n-Some dust particles or what ever you want to call it \n\nStep by Step video: http://www.youtube.com/watch?v=m_-4PLmOCNg",
"extension" : "swf",
"filename" : "suuxe-161533-ANIMATION_of_Insane_Black_Rock_Shooter_FAN_ART",
"height" : 900,
"index" : 161533,
"media" : "Digital drawing or painting",
"ratings" : ["Teen content"],
"score" : range(10, 30),
"src" : "https://pictures.hentai-foundry.com/s/suuxe/161533/suuxe-161533-ANIMATION_of_Insane_Black_Rock_Shooter_FAN_ART.swf",
"tags" : [
"animation",
"art",
"black",
"brs",
"epic",
"fan",
"flash",
"hot",
"insane",
"kid",
"rock",
"shooter"
],
"title" : "ANIMATION of Insane Black Rock Shooter FAN ART",
"user" : "suuxe",
"views" : range(30000, 40000),
"width" : 393,
},
{
"#url" : "http://www.hentai-foundry.com/pictures/user/Tenpura/407501/",
"#category": ("", "hentaifoundry", "image"),