st-scraper

1.3.0 • Public • Published

ST-Scraper

Build Status

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.

License

MIT

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i st-scraper

    Weekly Downloads

    31

    Version

    1.3.0

    License

    MIT

    Unpacked Size

    4.23 kB

    Total Files

    5

    Last publish

    Collaborators

    • zacbytes