Skip to content

Instantly share code, notes, and snippets.

@kanazux
Created May 21, 2014 03:20
Show Gist options
  • Save kanazux/0d803d050bff06a0d158 to your computer and use it in GitHub Desktop.
Save kanazux/0d803d050bff06a0d158 to your computer and use it in GitHub Desktop.
pegar_ip_valido.py
#!/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