Skip to content

MRDGH2821/pastebin-scraper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pastebin Scraper Library

NPM License NPM Downloads
NPM
GitHub Release Issues
run on repl.it Open Source Awesome

Usage

First, to be able to use the library, install it first using the following command:

npm install pastebin-scraper --save

This library is a promise-based library, so you first must require it in your code and then import the function Scrape:

const {Scrape} = require('pastebin-scraper');
Scrape('https://pastebin.com/4Z489JeC')
.then(res => console.log(res))

Output will be an object, which can be accessed using properties.

{
  title: 'Pastebin Scraper',
  views: '8',
  rawData: 'This is for the Pastebin scraper Node.js library',
  user: 'mrslurpyboi',
  expiration: 'Never',
  dateCreated: 'Aug 15th, 2021',
  language: 'text'
}

You can run this test this library in the tryit.js folder if you are, for example, running this library in GitHub or Replit.
v2.0.0

About

Scrapes a pastebin paste and gives data about it

Topics

Resources

Stars

Watchers

Forks

Languages

  • TypeScript 83.5%
  • JavaScript 16.5%