1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 03:02:50 +01:00

[sankaku] update/fix API headers

'Referer' and 'Origin' were both empty
This commit is contained in:
Mike Fährmann 2023-08-04 17:14:43 +02:00
parent fb3f0453db
commit a60db454af
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -24,6 +24,7 @@ class SankakuExtractor(BooruExtractor):
"""Base class for sankaku channel extractors"""
basecategory = "booru"
category = "sankaku"
root = "https://sankaku.app"
filename_fmt = "{category}_{id}_{md5}.{extension}"
cookies_domain = None
_warning = True
@ -258,9 +259,10 @@ class SankakuAPI():
def __init__(self, extractor):
self.extractor = extractor
self.headers = {
"Accept" : "application/vnd.sankaku.api+json;v=2",
"Origin" : extractor.root,
"Referer": extractor.root + "/",
"Accept" : "application/vnd.sankaku.api+json;v=2",
"Referer" : extractor.root + "/",
"Platform": "web-app",
"Origin" : extractor.root,
}
self.username, self.password = self.extractor._get_auth_info()