Pass cookies to the aria2c and requests downloaders

For aria2c I've simplified the operation by offloading most of the work for creating a cookie header by just re-doing what Python-requests does. This results in the exact same cookies Python-requests would have used in a requests.get() call or such. It supports multiple of the same-name cookies under different domains/paths based on the URI of the mock request.
This commit is contained in:
rlaphoenix
2023-05-29 22:23:39 +01:00
parent 1ff4858ca7
commit 6cfbaa7db1
5 changed files with 32 additions and 3 deletions

View File

@@ -428,6 +428,7 @@ class HLS:
uri=urljoin(segment.base_uri, segment.uri),
out=out_path,
headers=headers_,
cookies=session.cookies,
proxy=proxy,
silent=attempts != 5,
segmented=True