Closed larubiano0 closed 2 years ago
Check your proxy first
curl --proxy "HTTP://bogota:proxy@181.118.158.130:999" https://www.instagram.com/
or
import requests
resp = requests.get('https://www.instagram.com/', proxies={'https': "HTTP://bogota:proxy@181.118.158.130:999"}, timeout=4)
print(resp.status_code)
Thank you so much
Describe the bug
I'm having trouble in the log in step when setting up a free proxy
To Reproduce
Proxy info:
*Country and language were changed to my country’s
Traceback
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 595, in urlopen self._prepare_proxy(conn) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 816, in _prepare_proxy conn.connect() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connection.py", line 319, in connect self.sock = ssl_wrapsocket( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/ssl.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1040, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/adapters.py", line 440, in send resp = conn.urlopen( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 638, in urlopen retries = retries.increment(method, url, error=e, _pool=self, File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='i.instagram.com', port=443): Max retries exceeded with url: /api/v1/accounts/contact_point_prefill/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 284, in _send_private_request response = self.private.post( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 577, in post return self.request('POST', url, data=data, json=json, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 529, in request resp = self.send(prep, send_kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 645, in send r = adapter.send(request, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/adapters.py", line 517, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='i.instagram.com', port=443): Max retries exceeded with url: /api/v1/accounts/contact_point_prefill/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/larubiano0/Desktop/Vai/Instagram-Bot-Vai/follow_bot.py", line 187, in
bot = Bot()
File "/Users/larubiano0/Desktop/Vai/Instagram-Bot-Vai/follow_bot.py", line 62, in init
self._cl.login(IG_USERNAME, IG_PASSWORD)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/instagrapi/mixins/auth.py", line 372, in login
self.pre_login_flow()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/instagrapi/mixins/auth.py", line 47, in pre_login_flow
self.set_contact_point_prefill("prefill")
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/instagrapi/mixins/auth.py", line 147, in set_contact_point_prefill
return self.private_request("accounts/contact_point_prefill/", data, login=True)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 445, in private_request
raise e
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 432, in private_request
self._send_private_request(endpoint, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/instagrapi/mixins/private.py", line 376, in _send_private_request
raise ClientConnectionError(
instagrapi.exceptions.ClientConnectionError: SSLError HTTPSConnectionPool(host='i.instagram.com', port=443): Max retries exceeded with url: /api/v1/accounts/contact_point_prefill/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1129)')))
Expected behavior Being able to log-in successfully
Desktop (please complete the following information):
Additional context
I was running a follow bot (1 account) on a Google Cloud compute-engine instance, it worked well for 5-6 days, then the IP got banned and the instagram account received a phishing notification.
I've been trying to fix the problem by setting up a proxy, using free proxies form my country (Colombia)