st-scraper
v1.3.0
Published
Easy scraper for straits times articles
Downloads
10
Maintainers
Readme
ST-Scraper
Easy to use js scraper for straits times article.
Installation
Use the package manager npm to install st-scraper.
npm install st-scraper
Usage
const stscrape = require('st-scraper');
stscrape.ScrapeArticle('STRAITS TIMES ARTICLE URL HERE', function(err, ArticleData){
console.log(ArticleData) //logs entire article data object
console.log(ArticleData.title) //logs article title
console.log(ArticleData.text) //logs article text
console.log(ArticleData.postdate) //logs article post date
console.log(ArticleData.img) //logs image source
console.log(ArticleData.imgcaption) //logs article image caption
console.log(ArticleData.author) //logs article author
});
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to test before making pull requests.