Closed templateK closed 1 year ago
twitch-dl uses httpx which supports proxy configuration via environment variables. Could you try setting up a proxy using these? Docs here: https://www.python-httpx.org/environment_variables/#http_proxy-https_proxy-all_proxy
after setting ALL_PROXY
I got following error message.
Looking up video...
Traceback (most recent call last):
File "/tools/python/bin/twitch-dl", line 8, in <module>
sys.exit(main())
File "/tools/python/lib/python3.10/site-packages/twitchdl/console.py", line 321, in main
args.func(args)
File "/tools/python/lib/python3.10/site-packages/twitchdl/commands/download.py", line 170, in download
download_one(video_id, args)
File "/tools/python/lib/python3.10/site-packages/twitchdl/commands/download.py", line 176, in download_one
return _download_video(video_id, args)
File "/tools/python/lib/python3.10/site-packages/twitchdl/commands/download.py", line 268, in _download_video
video = twitch.get_video(video_id)
File "/tools/python/lib/python3.10/site-packages/twitchdl/twitch.py", line 103, in get_video
response = gql_query(query)
File "/tools/python/lib/python3.10/site-packages/twitchdl/twitch.py", line 44, in gql_query
response = authenticated_post(url, json={"query": query}, headers=headers).json()
File "/tools/python/lib/python3.10/site-packages/twitchdl/twitch.py", line 22, in authenticated_post
response = httpx.post(url, data=data, json=json, headers=headers)
File "/tools/python/lib/python3.10/site-packages/httpx/_api.py", line 304, in post
return request(
File "/tools/python/lib/python3.10/site-packages/httpx/_api.py", line 92, in request
with Client(
File "/tools/python/lib/python3.10/site-packages/httpx/_client.py", line 682, in __init__
self._mounts: typing.Dict[URLPattern, typing.Optional[BaseTransport]] = {
File "/tools/python/lib/python3.10/site-packages/httpx/_client.py", line 685, in <dictcomp>
else self._init_proxy_transport(
File "/tools/python/lib/python3.10/site-packages/httpx/_client.py", line 739, in _init_proxy_transport
return HTTPTransport(
File "/tools/python/lib/python3.10/site-packages/httpx/_transports/default.py", line 161, in __init__
raise ImportError(
ImportError: Using SOCKS proxy, but the 'socksio' package is not installed. Make sure to install httpx using `pip install httpx[socks]`
So , I installed dependency with pip install httpx[socks]
. After that It works like charm.
Thank you.
Twitch VOD/Clips are geo-blocked in some region. It will be nice to be able to use socks5 proxy for downloading just like
yt-dlp