mirror of
				https://github.com/devine-dl/devine.git
				synced 2025-11-04 03:44:49 +00:00 
			
		
		
		
	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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user