I'm writing a scraper that will extract information of a given proxy. I'm using python requests with private proxies having username and password to access "https://ip8.com/" that will give information about the proxy and will scrape the information.
Now, the problem is I tried almost everything but the request does not return anything, in fact does not return until timeout. Proxies are working perfectly fine, so no issues there.
I've tried almost every method. I've tried urllib3
as well, but had no success.
import requests
from requests.auth import HTTPProxyAuth
proxy_string = 'http://username:password@proxy:port'
s = requests.Session()
s.proxies = {"http": proxy_string , "https": proxy_string}
s.auth = HTTPProxyAuth("username","password")
r = s.get('https://ip8.com/') # OK
print(r.text)
I expect html of the page accessed through the IP to ip8.com