Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL error while downloading #7

Open
sclsj opened this issue Feb 10, 2020 · 0 comments
Open

SSL error while downloading #7

sclsj opened this issue Feb 10, 2020 · 0 comments

Comments

@sclsj
Copy link

sclsj commented Feb 10, 2020

Same when running python2 and 3
Running v2.
python2 output:
Traceback (most recent call last):
File "music.v2.py", line 81, in
r = requests.get(api_url + m_id)
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.bzqll.com', port=443): Max retries exceeded with url: /music/tencent/songList?key=579621905&id=6759909648 (Caused by SSLError(CertificateError("hostname 'api.bzqll.com' doesn't match 'api.hibai.cn'",),))

python3 output:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 597, in urlopen
self._prepare_proxy(conn)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 807, in _prepare_proxy
conn.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 390, in connect
_match_hostname(cert, self.assert_hostname or server_hostname)
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 400, in _match_hostname
match_hostname(cert, asserted_hostname)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 338, in match_hostname
% (hostname, dnsnames[0]))
ssl.SSLCertVerificationError: ("hostname 'api.bzqll.com' doesn't match 'api.hibai.cn'",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 399, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.bzqll.com', port=443): Max retries exceeded with url: /music/tencent/songList?key=579621905&id=4121058857 (Caused by SSLError(SSLCertVerificationError("hostname 'api.bzqll.com' doesn't match 'api.hibai.cn'")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "music.v2.py", line 81, in
r = requests.get(api_url + m_id)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.bzqll.com', port=443): Max retries exceeded with url: /music/tencent/songList?key=579621905&id=4121058857 (Caused by SSLError(SSLCertVerificationError("hostname 'api.bzqll.com' doesn't match 'api.hibai.cn'")))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant