Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Python - My External IP Address

DZone's Guide to

Python - My External IP Address

Free Resource

Today’s data climate is fast-paced and it’s not slowing down. Here’s why your current integration solution is not enough. Brought to you in partnership with Liaison Technologies.

import urllib

url = urllib.URLopener()
resp = url.open('http://myip.dk')
html = resp.read(114)

end = html.find("</title>")
start = html.find("IP:") + 3

print html[start:end].strip()


Is iPaaS solving the right problems? Not knowing the fundamental difference between iPaaS and iPaaS+ could cost you down the road. Brought to you in partnership with Liaison Technologies.

Topics:
python

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}