Skip to content

Instantly share code, notes, and snippets.

@yousefamar
Created March 12, 2015 15:06
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 yousefamar/31bebb46e8d932d9f4ce to your computer and use it in GitHub Desktop.
Save yousefamar/31bebb46e8d932d9f4ce to your computer and use it in GitHub Desktop.
A 4chan banner scraper
import urllib
import time
import os
if not os.path.exists("imgs"):
os.makedirs("imgs")
for i in xrange(1,260):
urllib.urlretrieve("http://s.4cdn.org/image/title/"+str(i)+".png", "imgs/"+str(i)+".png")
time.sleep(1)
for i in xrange(1,251):
urllib.urlretrieve("http://s.4cdn.org/image/title/"+str(i)+".gif", "imgs/"+str(i)+".gif")
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment