1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2025-01-31 19:51:34 +01:00

[koharu] send necessary headers for image downloads (#5893)

This commit is contained in:
Mike Fährmann 2024-07-30 19:39:50 +02:00
parent 399ba85841
commit ff58683b76
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 13 additions and 1 deletions

View File

@ -107,7 +107,11 @@ class KoharuGalleryExtractor(GalleryExtractor):
results = []
for entry in data["entries"]:
dimensions = entry["dimensions"]
info = {"w": dimensions[0], "h": dimensions[1]}
info = {
"w": dimensions[0],
"h": dimensions[1],
"_http_headers": self.headers,
}
results.append((base + entry["path"], info))
return results

View File

@ -54,7 +54,15 @@ __tests__ = (
"#options" : {"cbz": False, "format": "780"},
"#pattern" : r"https://koharusexo.xyz/data/59905/2df9110af7f1/a7cbeca3fb9c83aa87582a8a74cc8f8ce1b9e9b434dc1af293628871642f42df/[0-9a-f]+/.+",
"#count" : 22,
},
{
"#url" : "https://koharu.to/g/14216/6c67076fdd45",
"#category": ("", "koharu", "gallery"),
"#class" : koharu.KoharuGalleryExtractor,
"#options" : {"cbz": False, "format": "780"},
"#range" : "1",
"#sha1_content": "08954e0ae18a900ee7ca144d1661c664468c2525",
},
{