Aug-06-2017, 08:49 AM
Hello
I want to send a POST/GET request to an URL
I use from Requests module and create a Session
and send my requests with this session
Please help me to send this request with a Proxy (proxy is annonymouse and without user/pass)
I Test these three way but can't get answer (Of course maybe I made a mistake!)
Way 1:
Way 2:
Way 3:
Please help me or say to me a different way
Thanks a lot
I want to send a POST/GET request to an URL
I use from Requests module and create a Session
and send my requests with this session
Please help me to send this request with a Proxy (proxy is annonymouse and without user/pass)
I Test these three way but can't get answer (Of course maybe I made a mistake!)
Way 1:
1 |
session.proxies = {pr: ip + ":" + port} |
1 2 |
proxy = {pr: ip + ":" + port} s = session.post(link, data, proxies = proxy, headers = head) |
1 2 3 |
req = requests.Request( 'POST' , link, data = data, headers = head) prepped = req.prepare() resp = session.send(prepped, proxies = proxy) |
Thanks a lot