No Plugins; Monolithic

    cna-scraper

    1.0.3 • Public • Published

    CNA-Scraper

    Build Status

    Easy to use JS scraper for Channel News Asia articles.

    Installation

    Use the package manager npm to install cna-scraper.

    npm install cna-scraper

    Usage

    const cnascraper = require('cna-scraper');
     
    cnascraper.ScrapeArticle('CNA ARTICLE URL HERE', function(err, ArticleData){
       console.log(ArticleData) //logs entire article data object
     
       console.log(ArticleData.title) //logs article title
       console.log(ArticleData.category) //logs article ctegory
       console.log(ArticleData.text) //logs article text
       console.log(ArticleData.postdate) //logs article post date
       console.log(ArticleData.img) //logs image source (parsed for you)
       console.log(ArticleData.imgcaption) //logs article image caption
       console.log(ArticleData.source) //logs article source
    });

    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

    Install

    npm i cna-scraper

    DownloadsWeekly Downloads

    14

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    4.53 kB

    Total Files

    5

    Last publish

    Collaborators

    • zacbytes