Skip to content

Instantly share code, notes, and snippets.

@yunjey
Created August 25, 2017 16:43
Show Gist options
  • Save yunjey/b912ae5b7d3c8a296648f297074a3fdc to your computer and use it in GitHub Desktop.
Save yunjey/b912ae5b7d3c8a296648f297074a3fdc to your computer and use it in GitHub Desktop.
# pip install icrawler
from icrawler.builtin import GoogleImageCrawler
from datetime import date
google_crawler = GoogleImageCrawler(parser_threads=2, downloader_threads=3,
storage={'root_dir': './husky'}) # directory where images are downloaded
google_crawler.crawl(keyword='Siberian husky', max_num=1000, # max_num should be equal or less than 1000
date_min=date(2012, 3, 1), date_max=date(2012, 6, 1), # you can change date to get more than 1000 images
min_size=(256, 256), max_size=(512, 512))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment