Pornpics javascript crawler
pornpics javascript crawler is a node module that allows you to crawl pornpics.com and save picture automatically.
Features
- Fetch gallery informations
- Fetch category galleries
- Save gallery
- Save category
Installation
Install globally
npm i -g pornpicsoryarn global add pornpics
Install localy
npm i pornpicsoryarn add pornpics
CLI usage (global)
pornpics <category_url|gallery_url> <dest>
Example:
pornpics https://www.pornpics.com/ass/ pictures
Options
-a, --aggregate
no subdirectories (bool, default: false)
Downloads all pictures into the same directory regardless of which gallery it belongs to.
-p, --page <n>
starting page (int, default: 1)
Specifies which page should the crawler start at.
-l, --limit <n>
(int, default: 1)
Specifies how many pages should the crawler crawl.
-c, --cover
(bool, default: false)
Only downloads gallery covers. It only works with categories.
API (local)
Basic example
const Pornpics = const crawler = url: 'https://www.pornpics.com/ass/' page: 1 limit: 1 dest: 'dest' aggregate: true cover: false crawler // Fires when a gallery has been successfully fetchedcrawler crawler
Constructor options
url
(required, string)
The url of the desired category or gallery.
page
(int, default: 1)
The page the crawler will start at.
limit
(int, default: 1)
The amount of pages the crawler will crawl.
dest
(string, default: null)
The destination directory if you want to save the crawled pictures. If no dest
option is provided, no picture will be saved.
aggregate
(bool, default: false)
If dest
option is provided and if aggregate
is true, all pictures will be downloaded into the same directory regardless of which gallery it belongs to.
cover
(bool, default: false)
If dest
option is provided and if cover
is true, the crawler will only save gallery covers. It only works with categories.
Events
fetch
(gallery)
Fires when a gallery has been crawled.
end
Fires when crawl has ended.
downloaded
(gallery)
Fires when a gallery has been downloaded.
download-end
Fires when crawl download has ended.