Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A simple image scraper to download all images from a given url

Project Description

A high performance, easy to use, multithreaded command line tool which downloads images from the given webpage.

Build Status Version Downloads

Demo

Click here to see it in action!

Download

You can also download using pip:

$ pip install ImageScraper

Dependencies

Note that ImageScraper depends on lxml, requests, setproctitle, and future. It also depends on pyThreadpool which can be downloaded and installed from here temporarily. If you run into problems in the compilation of lxml through pip, install the libxml2-dev and libxslt-dev packages on your system.

Usage

$ image-scraper [OPTIONS] URL

You can also use it in your Python scripts.

import image_scraper
image_scraper.scrape_images(URL)

Options

-h, --help                      Print help
-m, --max-images <number>       Maximum number images to be scraped
-s, --save-dir  <path>          Name of the folder to save the images
-g, --injected                  Scrape injected images
--formats [ [FORMATS ..]]       Specify the formats of images to be scraped
--max-filesize  <size>          Limit on size of image in bytes (default: 100000000)
--dump-urls                     Print the URLs of the images
--scrape-reverse                Scrape the images in reverse order
--proxy-urls            Use the specified HTTP/HTTPS proxy

If you downloaded the tar:

Extract the contents of the tar file.

$ cd ImageScraper/
$ python setup.py install
$ image-scraper --max-images 10 [url to scrape]

Examples

Scrape all images

$ image-scraper  ananth.co.in/test.html

Scrape at max 2 images

$ image-scraper -m 2 ananth.co.in/test.html

Scrape only gifs and download to folder ./mygifs

$ image-scraper -s mygifs ananth.co.in/test.html --formats gif

NOTE:

By default, a new folder called “images_” will be created in the working directory, containing all the downloaded images.

Release History

Release History

This version
History Node

2.0.7

History Node

2.0.6

History Node

2.0.5

History Node

2.0.3

History Node

2.0.2

History Node

2.0.1

History Node

2.0.0

History Node

1.1.0

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ImageScraper-2.0.7-py2.py3-none-any.whl (10.0 kB) Copy SHA256 Checksum SHA256 2.7 Wheel May 5, 2015
ImageScraper-2.0.7.tar.gz (8.6 kB) Copy SHA256 Checksum SHA256 Source May 5, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting