[boosty] send 'Authorization' header for file downloads (#8704)

This commit is contained in:
Mike Fährmann
2025-12-15 17:31:44 +01:00
parent c268f793a4
commit d43ce45cb8
2 changed files with 8 additions and 0 deletions

View File

@@ -49,6 +49,9 @@ class BoostyExtractor(Extractor):
self.videos = videos
def items(self):
headers = self.api.headers.copy()
del headers["Accept"]
for post in self.posts():
if not post.get("hasAccess"):
self.log.warning("Not allowed to access post %s", post["id"])
@@ -61,6 +64,7 @@ class BoostyExtractor(Extractor):
"post" : post,
"user" : post.pop("user", None),
"count": len(files),
"_http_headers": headers,
}
yield Message.Directory, "", data

View File

@@ -38,6 +38,10 @@ __tests__ = (
"extension": "",
"filename" : "75f86086-fc67-4ed2-9365-2958d3d1a8f7",
"_http_headers": {
"!Accept": str,
"Origin" : "https://www.boosty.to",
},
"file": {
"height" : 2048,
"id" : "75f86086-fc67-4ed2-9365-2958d3d1a8f7",