AnthonyBloomer / ezflix

Command line utility that enables users to search for TV and movie torrents and stream using Peerflix automatically.
https://anthonybloomer.github.io/ezflix/
MIT License
47 stars 9 forks source link

eztv connection/ SSL problem #25

Closed moihub closed 4 years ago

moihub commented 4 years ago

It seems that eztv.ag is redirecting to eztv.io but urlopen is not following the redirect (I'm not sure; this is just a shot in the dark). It also seems that there is a mismatch between the server's domain name and the server's SSL certificate, which is causing another problem. Opera (the browser) tells me that eztv is using a certificate issued to cloudflare (see screenshot at https://i.imgur.com/5MCOynv.png ). Now here's the output from a simple search command. Thank you for your help.

ezflix lucifer

Searching...Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 386, in connect _match_hostname(cert, self.assert_hostname or server_hostname) File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 396, in _match_hostname match_hostname(cert, asserted_hostname) File "/usr/lib/python3.8/ssl.py", line 420, in match_hostname raise CertificateError("hostname %r " ssl.SSLCertVerificationError: ("hostname 'eztv.ag' doesn't match 'search.dnsadvantage.com'",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='eztv.ag', port=443): Max retries exceeded with url: /api/get-torrents?imdb_id=4052886&page=1&limit=20 (Caused by SSLError(SSLCertVerificationError("hostname 'eztv.ag' doesn't match 'search.dnsadvantage.com'")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/aa/.local/bin/ezflix", line 8, in sys.exit(main()) File "/home/aa/.local/lib/python3.8/site-packages/ezflix/main.py", line 43, in main search(p) File "/home/aa/.local/lib/python3.8/site-packages/ezflix/main.py", line 159, in search torrents = ezflix.search() File "/home/aa/.local/lib/python3.8/site-packages/ezflix/ezflix.py", line 74, in search self._torrents = eztv( File "/home/aa/.local/lib/python3.8/site-packages/ezflix/extractors/eztv.py", line 32, in eztv req = requests.get( File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get return request('get', url, params=params, kwargs) File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send r = adapter.send(request, kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='eztv.ag', port=443): Max retries exceeded with url: /api/get-torrents?imdb_id=4052886&page=1&limit=20 (Caused by SSLError(SSLCertVerificationError("hostname 'eztv.ag' doesn't match 'search.dnsadvantage.com'")))

~

AnthonyBloomer commented 4 years ago

Hello @moihub, thank you for creating this issue! I couldn't reproduce the error you have reported but I have updated the extractor URLs to match what is documented in their API documentation.

AnthonyBloomer commented 4 years ago

Closing this one.