Skip to content

Instantly share code, notes, and snippets.

@tokoroten
Created July 28, 2012 06:28
Show Gist options
  • Save tokoroten/3192092 to your computer and use it in GitHub Desktop.
Save tokoroten/3192092 to your computer and use it in GitHub Desktop.
dropbox_crawler
#coding: utf-8
import urllib2
def main():
for i in xrange(1, 264055420):
#http://dl.dropbox.com/u/26405542/index.html
url = "http://dl.dropbox.com/u/%d/index.html" % i
try:
handle = urllib2.urlopen(url)
data = handle.read()
fp = open("%d_index.html" % i, "wb")
fp.write(data)
fp.close()
print i, "OK"
except:
#print i, "NG"
continue
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment