Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Draft saved
Draft discarded
Cancel
5
  • Remove the http:// and https://? Also, what does a sample proxy_line contain? Commented Jul 18, 2017 at 12:22
  • @COLDSPEED Thanks! I think it works now, but it gives me not the proxy ip for some, but other ip. Its not my ip, but its not a proxy ip either, in the browser with proxy i visit same site and see the proxy ip. proxy_line contains a proxy like this: 79.110.31.87:8085, and in the browser i see the same ip when visiting api.ipify.org, but from python i get weird addresses Commented Jul 18, 2017 at 12:27
  • It might have something to do with allow_redirects=False. In your browser, redirects are allowed automatically. Let me know if removing that fixes it, I'll create an answer for posterity. Commented Jul 18, 2017 at 12:29
  • @cᴏʟᴅsᴘᴇᴇᴅ i tried to set allow_redirects=True and it still same weird results, for example for proxy 79.110.31.87:8085 i got {"ip":"162.220.246.230"} i tried to ,make request to whoer.net and it display the same ip Commented Jul 18, 2017 at 12:35
  • @cᴏʟᴅsᴘᴇᴇᴅ nevermind, i had a system proxy set up. I removed it and now i always get my ip address instead of proxy from python Commented Jul 18, 2017 at 12:40

lang-py

AltStyle によって変換されたページ (->オリジナル) /