Python Forum
send requests to URL with proxy
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
send requests to URL with proxy
#1
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:
session.proxies = {pr: ip + ":" + port}
Way 2:
proxy = {pr: ip + ":" + port}
s = session.post(link, data, proxies=proxy, headers=head)
Way 3:
req = requests.Request('POST', link, data=data, headers=head)
prepped = req.prepare()
resp = session.send(prepped, proxies=proxy)
Please help me or say to me a different way
Thanks a lot
Reply
#2
that is the only way i know of
http://docs.python-requests.org/en/maste...d/#proxies
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to make each thread send multiple requests in python3? Contra_Boy 0 1,777 Apr-29-2020, 02:42 PM
Last Post: Contra_Boy

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020