aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/downloader/external.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/downloader/external.py')
-rw-r--r--yt_dlp/downloader/external.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/yt_dlp/downloader/external.py b/yt_dlp/downloader/external.py
index d4045e58f..e307502db 100644
--- a/yt_dlp/downloader/external.py
+++ b/yt_dlp/downloader/external.py
@@ -10,6 +10,7 @@ import uuid
from .fragment import FragmentFD
from ..compat import functools
+from ..networking import Request
from ..postprocessor.ffmpeg import EXT_TO_OUT_FORMATS, FFmpegPostProcessor
from ..utils import (
Popen,
@@ -25,7 +26,6 @@ from ..utils import (
encodeFilename,
find_available_port,
remove_end,
- sanitized_Request,
traverse_obj,
)
@@ -357,13 +357,12 @@ class Aria2cFD(ExternalFD):
'method': method,
'params': [f'token:{rpc_secret}', *params],
}).encode('utf-8')
- request = sanitized_Request(
+ request = Request(
f'http://localhost:{rpc_port}/jsonrpc',
data=d, headers={
'Content-Type': 'application/json',
'Content-Length': f'{len(d)}',
- 'Ytdl-request-proxy': '__noproxy__',
- })
+ }, proxies={'all': None})
with self.ydl.urlopen(request) as r:
resp = json.load(r)
assert resp.get('id') == sanitycheck, 'Something went wrong with RPC server'