Skip to content

Instantly share code, notes, and snippets.

View twolfe18's full-sized avatar

Travis Wolfe twolfe18

  • Google
  • San Francisco
View GitHub Profile
@twolfe18
twolfe18 / gifs_plox.py
Created October 21, 2011 03:43
scrape gif.tv's lovely library (use responsibly)
from optparse import OptionParser
import urllib, time, sys, os.path
parser = OptionParser()
parser.add_option('-n', '--howmany', help='how many gifs to download')
parser.add_option('-d', '--delay', help='delay in ms between reqs (default=2000)')
opts,args = parser.parse_args()
howmany = int(opts.howmany) if opts.howmany is not None else 5
delay = int(opts.delay) if opts.delay is not None else 2000