[hitomi] set Referer header (fixes #239)
This commit is contained in:
parent
5582b06ae4
commit
2756cc8dde
@ -26,6 +26,11 @@ class HitomiGalleryExtractor(GalleryExtractor):
|
||||
# "aa" subdomain for gallery-id ending in 1 (#142)
|
||||
"pattern": r"https://aa\.hitomi\.la/",
|
||||
}),
|
||||
("https://hitomi.la/galleries/1401410.html", {
|
||||
# download test
|
||||
"range": "1",
|
||||
"content": "b3ca8c6c8cc5826cf8b4ceb7252943abad7b8b4c",
|
||||
}),
|
||||
("https://hitomi.la/reader/867789.html"),
|
||||
)
|
||||
|
||||
@ -68,6 +73,9 @@ class HitomiGalleryExtractor(GalleryExtractor):
|
||||
subdomain = chr(97 + offset) + "a"
|
||||
base = "https://" + subdomain + ".hitomi.la/galleries/"
|
||||
|
||||
# set Referer header before image downloads (#239)
|
||||
self.session.headers["Referer"] = self.chapter_url
|
||||
|
||||
return [
|
||||
(base + urlpart, None)
|
||||
for urlpart in text.extract_iter(
|
||||
|
Loading…
x
Reference in New Issue
Block a user