I've been looking around trying to find a solution, but nothing has worked. I have this code:
import requests, re
import time
proxies = {
'http': 'http://:user:pass@proxy_ip:port',
'https': 'https://:user:pass@proxy_ip:port'
}
r = requests.get('https://httpbin.org/ip', proxies=proxies)
print(r.text)
I'm getting this error:
requests.exceptions.ProxyError: HTTPSConnectionPool(host='httpbin.org', port=443): Max retries exceeded with url: /ip (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))
I have tried rewriting with urllib as per this post: link
I have tried adding authentication arguments to the request as per this post: link
I have tried upgrading and or downgrading my requests library as per this post and a few other related posts: link
I have tried adding all headers from the request and that also does nothing.
I am using a static proxy from IPRoyal's proxy service and have double checked to be sure that HTTPS requests are supported for the proxy I paid for.
Any and all help is appreciated, please let me know if any further information is needed and I will try to provide it.