Created
December 26, 2013 12:45
-
-
Save kanazux/8133431 to your computer and use it in GitHub Desktop.
Return my ip by speedtest xml
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/env python | |
# -*- coding: ISO-8859-1 -*- | |
# Created in: Thu 19/Dec/2013 hs 15:06 | |
# Last Change: Thu 19/Dec/2013 hs 15:06 | |
# Autor: -- kanazuchi -- | |
from urllib2 import urlopen | |
from xml.dom import minidom as dom | |
url = dom.parseString(urlopen('http://www.speedtest.net/speedtest-config.php').read()) | |
client = url.getElementsByTagName('client') | |
print(client[0].attributes['ip'].value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment