Forums

Webshare proxies?

Hello, I am running code in pythonanywhere that needs proxies to function. Problem is that my proxies(webshare.io) needs authorization from either an ip that you enter in webshare or username and password. Now lets just say that the username and password wont work so I am trying to get the ip of the machine I am running my code on. But when I get the ip, by using curl ifconfig.me command, it is not a normal ip(example of ip I get from machine: 18.197.46.15235:56) that I can enter in webshare(example of "normal ip" 30.231.41.54 .I am very new to this so I am kind of lost. Any ideas?

That's a weird response from the curl command; I just ran it in my own account and got the valid result 18.197.67.125. Perhaps you'd have more luck using the ipify Python module?

It's worth noting, however, that the IP address used by your code will change over time. So even if you're using ipify, you won't be able to do a one-off config; you'll need to make sure each time your code runs that the current IP is on the allow-list for webshare.io. If they have an API to register a new IP, the easiest way would be to put something at the start of your code that first used ipify to get the current IP, then called that API to register it.

Unfortunately that didn't work, it is very weird that my ip on pythonanywhere looks like that.

What happens with the ipify module?

Hello, I no longer have this issue since I was able to use the proxies with username and password authorization. But when I ran the ipify module I still got the same ip.

Could you take a screenshot showing that and post it here? That sounds really strange.

If you run curl ifconfig.me, it prints the IP address, but not a new line. What your seeing is the IP address + the time which is printed in front of the new prompt. Compare with curl ifconfig.me > myip.txt or so