Skip to main content

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

Project description

A cool command line tool which downloads images from the given webpage.

Build Status

Version

Downloads

Build Status

Latest Version

PyPi downloads

Demo

Click here to see it in action!

Download

tar file:

Grab the latest stable build from - Pip: https://pypi.python.org/pypi/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

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.

Contributors

Project details


Download files

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

Source Distribution

ImageScraper-2.0.6.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ImageScraper-2.0.6-py2.py3-none-any.whl (9.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ImageScraper-2.0.6.tar.gz.

File metadata

  • Download URL: ImageScraper-2.0.6.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ImageScraper-2.0.6.tar.gz
Algorithm Hash digest
SHA256 77163a2097cb1294d805f2f40a1e8fafd62c2751e2c31dbe8b716300e52e69eb
MD5 4d2d328bd3052d1030d02da34f9fb2f7
BLAKE2b-256 c1c2b5d65c2eeb0ed69fb5c3f0f4df10820ccc46a286ca89c00b41d2cf906e6e

See more details on using hashes here.

File details

Details for the file ImageScraper-2.0.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ImageScraper-2.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b66aea35a50eaf294ed248f67bd49de1d5c21b1c80be18bec363ce8b5ea1e6b6
MD5 fee3c96def4209eb047b5419040e7ca5
BLAKE2b-256 0a1803712f98a9081293b69ee5cdd24704fc98a0187460aba37806e55006606a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page