Created
May 21, 2014 03:20
-
-
Save kanazux/0d803d050bff06a0d158 to your computer and use it in GitHub Desktop.
pegar_ip_valido.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from urllib2 import urlopen | |
import xml.etree.ElementTree as etree | |
xmldoc = etree.fromstring(urlopen('http://www.speedtest.net/speedtest-config.php','r').read()) | |
print xmldoc.find('client').attrib['ip'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment