[koharu] send necessary headers for image downloads (#5893)
This commit is contained in:
@@ -107,7 +107,11 @@ class KoharuGalleryExtractor(GalleryExtractor):
|
|||||||
results = []
|
results = []
|
||||||
for entry in data["entries"]:
|
for entry in data["entries"]:
|
||||||
dimensions = entry["dimensions"]
|
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))
|
results.append((base + entry["path"], info))
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,15 @@ __tests__ = (
|
|||||||
"#options" : {"cbz": False, "format": "780"},
|
"#options" : {"cbz": False, "format": "780"},
|
||||||
"#pattern" : r"https://koharusexo.xyz/data/59905/2df9110af7f1/a7cbeca3fb9c83aa87582a8a74cc8f8ce1b9e9b434dc1af293628871642f42df/[0-9a-f]+/.+",
|
"#pattern" : r"https://koharusexo.xyz/data/59905/2df9110af7f1/a7cbeca3fb9c83aa87582a8a74cc8f8ce1b9e9b434dc1af293628871642f42df/[0-9a-f]+/.+",
|
||||||
"#count" : 22,
|
"#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",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user