My IP is not changing after connecting to the VPN(NordVPN). Here's my code:
How can I fix this? I am noob in python please help by listing the step by step guide.
import requests
res=requests.get("https://httpbin.org/ip")
print(res.text)
My IP is not changing after connecting to the VPN(NordVPN). Here's my code:
How can I fix this? I am noob in python please help by listing the step by step guide.
import requests
res=requests.get("https://httpbin.org/ip")
print(res.text)
I can't comment on this post so I'll just tell you that you should format code by surrounding it with backticks (this character: ` ). Also, please separate each line. Please update your post.
As for your question, please do understand that Python code is not necessary to check your IP address. Simply going to that web address in your browser should show you your IP. Moreover, if your IP address is not changing after enabling a VPN, your VPN is at fault, not Python. When I use a VPN and go to that address in the browser, it does work.
Finally, I suspect that you are using a NordVPN browser extension, not a system-wide VPN. In that case, Python is not actually going through your browser to access the web address. It is directly requesting the information from the webpage. If you install system-wide, it should work.