1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 04:02:32 +01:00

[skeb] prevent 429 errors and need for 'request_key' cookie

https://github.com/danbooru/danbooru/pull/5795
This commit is contained in:
Mike Fährmann 2024-09-26 15:13:10 +02:00
parent e8c5b57a33
commit f0267f969a
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -26,7 +26,11 @@ class SkebExtractor(Extractor):
def _init(self):
self.thumbnails = self.config("thumbnails", False)
self.article = self.config("article", False)
self.headers = {"Accept": "application/json, text/plain, */*"}
self.headers = {
"Accept": "application/json, text/plain, */*",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
}
if "Authorization" not in self.session.headers:
self.headers["Authorization"] = "Bearer null"