Skip to content

Instantly share code, notes, and snippets.

@kanazux
Created May 21, 2014 03:39
Show Gist options
  • Save kanazux/45d0bcc980b7d487fa2f to your computer and use it in GitHub Desktop.
Save kanazux/45d0bcc980b7d487fa2f to your computer and use it in GitHub Desktop.
#!/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 "ISP: {} / IP: {}".format(xmldoc.find('client').attrib['isp'],xmldoc.find('client').attrib['ip'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment