[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

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"