Today we are going to share a Python program to get your external IP address. If you are a python beginner and want to start learning the python programming, then keep your close attention in this tutorial as I am going to share a Python program to get your external IP address.
To increase your Python knowledge, practice all Python programs:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import urllib import re print ("we will try to open this url, in order to get IP Address") url = "http://freewebmentor.com" print (url) request = urllib.urlopen(url).read() theIP = re.findall(r"d{1,3}.d{1,3}.d{1,3}.d{1,3}", request) print ("your IP Address is: ", theIP) |
we will try to open this url, in order to get IP Address
http://freewebmentor.com
your IP Address is: 216.245.197.154
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.