Skip to content

Commit

Permalink
Added examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sananth12 committed Mar 7, 2015
1 parent 2f2632e commit 42a9a59
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ A cool command line tool which downloads all images in the given webpage.
| ------------ | ------- | ------------------- |
| [![Build Status](https://travis-ci.org/sananth12/ImageScraper.svg?branch=master)](https://travis-ci.org/sananth12/ImageScraper) | [![Latest Version](https://pypip.in/v/ImageScraper/badge.png)](https://pypi.python.org/pypi/ImageScraper/) | [![PyPi downloads](http://img.shields.io/badge/downloads-7.3k%20total-blue.svg)](https://pypi.python.org/pypi/ImageScraper) |

####Demo
Click [here](http://showterm.io/d3aef5bc3f37cd49757d1#fast) to see it in action!

Download
Expand Down Expand Up @@ -38,33 +39,44 @@ Options
```sh
-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 (default: ./images_<domain>)
-s, --save-dir <path> Name of the folder to save the 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.
```sh
$cd ImageScraper/
$python setup.py install
$image-scraper --max-images 10 [url to scrape]
$ cd ImageScraper/
$ python setup.py install
$ image-scraper --max-images 10 [url to scrape]

```
###If installed using pip:
Open python in terminal.
Examples
--------
Scrape all images
```sh
$image-scraper --max-images 10 [url to scrape]
$ image-scraper ananth.co.in/test.html
```
Scrape 2 images
```sh
$ image-scraper -m 2 ananth.co.in/test.html
```
Scrape only gifs and download to folder ./mygifs
```sh
$ image-scraper -s mygifs ananth.co.in --formats gif
```
####NOTE:
A new folder called "images_<domain>" will be created in the same place, containing all the downloaded images.
By default, a new folder called "images_<domain>" will be created in the working directory, containing all the downloaded images.
Issues
Expand Down

0 comments on commit 42a9a59

Please sign in to comment.