forked from DRMTalks/devine
Set Referer & User-Agent via dedicated options instead Header in aria2c
This commit is contained in:
parent
347c31d717
commit
316f8f0530
|
@ -100,6 +100,12 @@ async def aria2c(
|
|||
# we cannot set an allowed encoding, or it will return compressed
|
||||
# and the code is not set up to uncompress the data
|
||||
continue
|
||||
if header.lower() == "referer":
|
||||
arguments.extend(["--referer", value])
|
||||
continue
|
||||
if header.lower() == "user-agent":
|
||||
arguments.extend(["--user-agent", value])
|
||||
continue
|
||||
arguments.extend(["--header", f"{header}: {value}"])
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue