streamrip icon indicating copy to clipboard operation
streamrip copied to clipboard

[FEATURE] Proxy support

Open pestapever opened this issue 3 years ago • 3 comments

Is the feature request related to a problem. Please describe it.

I can't download behind http proxy.

Describe the solution you would like.

Add a - - proxy parameter. Or https_proxy, https_proxy, no_proxy parameters as usual.

Describe alternatives you've considered.

No alternatives.

pestapever avatar May 28 '22 06:05 pestapever

I'll consider adding this. For now, try using environment variables.

Mac/Linux:

export HTTP_PROXY=10.10.1.10:3128
export HTTPS_PROXY=10.10.1.11:1080
export FTP_PROXY=10.10.1.10:3128

Windows:

set http_proxy=10.10.1.10:3128
set https_proxy=10.10.1.11:1080
set ftp_proxy=10.10.1.10:3128

nathom avatar Jun 20 '22 17:06 nathom

Ok thanks. But if I run "rip url XYZ"

given SET HTTP_PROXY=name:password@hostname:port/ SET HTTPS_PROXY=name:password@hostname:port/

I got this:

Exception in thread Thread-1 (is_outdated): Traceback (most recent call last): File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run self._target(*self._args, self._kwargs) File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\rip\cli.py", line 815, in is_outdated Logging into qobuz r = requests.get("https://pypi.org/pypi/streamrip/json").json() File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py", line 73, in get return request("get", url, params=params, kwargs) File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, kwargs) File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 456, in send conn = self.get_connection(request.url, proxies) File "C:\Users*\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py", line 348, in get_connection raise InvalidProxyURL( requests.exceptions.InvalidProxyURL: Please check proxy URL. It is malformed and could be missing the host.

InvalidProxyURL

Please check proxy URL. It is malformed and could be missing the host.

at ~\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\adapters.py:348 in get_connection 344│ if proxy: 345│ proxy = prepend_scheme_if_needed(proxy, "http") 346│ proxy_url = parse_url(proxy) 347│ if not proxy_url.host: → 348│ raise InvalidProxyURL( 349│ "Please check proxy URL. It is malformed " 350│ "and could be missing the host." 351│ ) 352│ proxy_manager = self.proxy_manager_for(proxy)

If this was unexpected, please open a Bug Report at https://github.com/nathom/streamrip/issues/new/choose

pestapever avatar Jun 27 '22 11:06 pestapever

Close please

pestapever avatar Aug 30 '22 11:08 pestapever

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 30 '22 07:10 stale[bot]