pullstocksnapimageslive v1.0.7
PullStocksnap.io-Live
PullStocksnap.io-Live is an npm module which enables you to easily scrape images from stocksnap website. It also allows you to set the number of days which the images from the provided URL will be pulled down, withount you needing to scrape every time.
- Easily scrape images from stockio website
Stockio image folder will be generated in your project with the pulled down images in a folder which you have specified
Set number of days after which the images will be pulled down again which will give you brand new images that were uploaded.
The scraped image will be returned in an array formar so you can use it elsewhere in the application such a gallery
Version
1.0.0
Extended Modules
PullStocksnap.io-Live uses a number of npm modules to work:
- request - used for for making a request to stocksnapio website
- cheerio - allows to use jquery in node
- fs - used for writing, reading and creating files and directories
- jsonfile - used for reading and writing to json files used in the module
Installation
$ npm install --save pullstocksnapimageslive
Usage
To pull all stocksnap images from provided url you have to provide the following values.
First, require the module:
stockPull = require('pullstocksnapimageslive');
stockPull.loadImages(url, pullLive, folder which the url images be saved to, after how many days should the images be pulled from the url);
// loadImages is the function which pulls down images and takes
// the following parameters
stockPull.loadImages(url, live, folder, days);
url -> the url to pull images from stocksnap
live -> provide value of true or false.
True if you want images to be pulled down after num of days.
False if you do not.
folder -> Folder to which the images will be saved to within the stocksnapImages folder which will be generater once loadImages() function is called.
days -> Provide the value of how many days go by before the images are pulled down again.
Example:
var images = stockPull.loadImages('https://stocksnap.io/search/money/sort/relevance/desc', true, 'money/', 7);
Images will contain the url of the images pulled down so they can be used elsewhere in the application.
PullStocksnap.io-Live
PullStocksnap.io-Live is an npm module which enables you to easily scrape images from stocksnap website. It also allows you to set the number of days which the images from the provided URL will be pulled down, withount you needing to scrape every time.
- Easily scrape images from stockio website
Stockio image folder will be generated in your project with the pulled down images in a folder which you have specified
Set number of days after which the images will be pulled down again which will give you brand new images that were uploaded.
The scraped image will be returned in an array formar so you can use it elsewhere in the application such a gallery
Version
1.0.0
Extended Modules
PullStocksnap.io-Live uses a number of npm modules to work:
- request - used for for making a request to stocksnapio website
- cheerio - allows to use jquery in node
- fs - used for writing, reading and creating files and directories
- jsonfile - used for reading and writing to json files used in the module
Installation
$ npm install --save pullstocksnap.io-live
Usage
To pull all stocksnap images from provided url you have to provide the following values.
First, require the module:
stockPull = require('pullStocksnap.io-live');
stockPull.loadImages(url, pullLive, folder which the url images be saved to, after how many days should the images be pulled from the url);
// loadImages is the function which pulls down images and takes
// the following parameters
stockPull.loadImages(url, live, folder, days);
url -> the url to pull images from stocksnap
live -> provide value of true or false.
True if you want images to be pulled down after num of days.
False if you do not.
folder -> Folder to which the images will be saved to within the stocksnapImages folder which will be generater once loadImages() function is called.
days -> Provide the value of how many days go by before the images are pulled down again.
Example:
var images = stockPull.loadImages('https://stocksnap.io/search/money/sort/relevance/desc', true, 'money/', 7);
Images will be an array which contains the url of the images pulled down so they can be used elsewhere in the application.