Created
April 7, 2015 00:24
-
-
Save moloch--/b3383cf1e7a6aea6f216 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
import urllib2 | |
from zipfile import ZipFile | |
from cStringIO import StringIO | |
ALEXA_URL = "http://s3.amazonaws.com/alexa-static/top-1m.csv.zip" | |
response = urllib2.urlopen(ALEXA_URL) | |
alexa = ZipFile(StringIO(response.read())) | |
for host in alexa.open('top-1m.csv').readlines(): | |
print host |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment