⬅︎ Back to Best practice with retries with requests
I use this:# sample proxy, does not work, set your own proxyproxies = {"https": "https://381.177.84.291:9040"}# create sessionsession = self.requests_retry_session() # get requestresponse = session.get(url, proxies=proxies)
how to use proxy?
Thank you, this option also works:resp = requests_retry_session().post( 'http://httpbin.org/post', proxies= {"http": "http://381.177.84.291:9040"})
Comment
I use this:
# sample proxy, does not work, set your own proxy
proxies = {"https": "https://381.177.84.291:9040"}
# create session
session = self.requests_retry_session()
# get request
response = session.get(url, proxies=proxies)
Parent comment
how to use proxy?
Replies
Thank you, this option also works:
resp = requests_retry_session().post(
'http://httpbin.org/post',
proxies= {"http": "http://381.177.84.291:9040"}
)