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

· Integration Zone ·
Free Resource

Your feedback matters—tell Capital One DevExchange what you would do with their Money Movement API.

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()


Here’s your opportunity to influence experimental APIs. Tell Capital One DevExchange what you think of their new Money Movement API.

Topics:
python

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}