GeneralMills / pytrends

Pseudo API for Google Trends
Other
3.12k stars 798 forks source link

Proxy error #599

Open CyberTamilan opened 10 months ago

CyberTamilan commented 10 months ago

I tried with some free proxy and getting this error. Can anyone tell me which proxy service provider I need to use

Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/requests/adapters.py", line 497, in send chunked=chunked, File "/root/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 845, in urlopen method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2] File "/root/.local/lib/python3.7/site-packages/urllib3/util/retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='trends.google.com', port=443): Max retries exceeded with url: /trends/explore/?geo=US (Caused by ProxyError('Unable to connect to proxy. Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)'))))

john-m24 commented 1 month ago

Hey Cyber, it looks like you're using a proxy service that uses HTTP protocol. Make sure you're using a proxy service that uses HTTPS protocol. This error is visible where it says: "Caused by ProxyError('Unable to connect to proxy. Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP". You can tell if your proxy service is using HTTPS protocol if it starts with "https" instead of "HTTP".