Skip to content

Instantly share code, notes, and snippets.

@fanzeyi
Created July 15, 2012 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fanzeyi/3118264 to your computer and use it in GitHub Desktop.
Save fanzeyi/3118264 to your computer and use it in GitHub Desktop.
import grequests
BASE_PATH = 'http://xxxxx.com/web/_photo/pic/'
urls = ["%d0000%s%d" % (year, '0'*(4-len(str(no))), no) for year in range(2005, 2012) for no in range(2001)]
rs = (grequests.get(BASE_PATH + u + '.JPG') for u in urls)
result = grequests.map(rs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment