1.0.1 • Published 3 years ago

article_scraper v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Article Scraper

CI npm Codecov

Package for scraping information from different blogging websites.

✅ Currently supported sites

🚧 Planned sites to support:

Installing

For the latest version:

npm i article_scraper

Usage

import { ArticleMetaData, ArticleScraper } from "article_scraper";

const url = "https://dev.to/ashish9342/commenting-code-good-practices-3d23";
const scraper: ArticleScraper = new ArticleScraper(url);
await scraper.scrape();
const result: ArticleMetaData = scraper.articleMetaData();

The ArticleMetaData result will contain information about the article in the following format. Any errors encountered during scraping will be added to the errors attribute.

ArticleMetaData {
  title: 'Commenting Code | Good Practices',
  minuteRead: 3,
  tags: [
    {
      name: '#programming',
      href: 'https://dev.to/t/programming',
      color: '#ffffff',
      backgroundColor: '#890606'
    },
    {
      name: '#javascript',
      href: 'https://dev.to/t/javascript',
      color: '#000000',
      backgroundColor: '#F7DF1E'
    },
    {
      name: '#codequality',
      href: 'https://dev.to/t/codequality',
      color: '#000000',
      backgroundColor: '#e5fffd'
    },
    {
      name: '#productivity',
      href: 'https://dev.to/t/productivity',
      color: '#C8F7C5',
      backgroundColor: '#2A0798'
    }
  ],
  url: 'https://dev.to/ashish9342/commenting-code-good-practices-3d23',
  errors: []
}
1.0.1

3 years ago

1.0.0

3 years ago

0.1.6

3 years ago

0.1.2

3 years ago

0.1.4

3 years ago

0.1.5

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.9

3 years ago

0.0.1

3 years ago