1.0.4 • Published 9 months ago

scribd-scraper v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

scribd-scraper

This tool scrapes Scribd documents, downloading images from each page and converting to PDF.

How to use

Install the package:

npm i scribd-scraper

Examples

Only download images

const scrapeScribd = require('scribd-scraper');

const url = 'https://pt.scribd.com/document/477711709/1990-02-mara-maravilha-pdf';
const dir = './images';

scrapeScribd(url, dir)
  .then(() => {
    console.log("Images downloaded successfully.");
  })
  .catch((error) => {
    console.error("Error:", error.message);
  });

Download and convert to PDF

const scrapeScribd = require('scribd-scraper');

const url = 'https://pt.scribd.com/document/477711709/1990-02-mara-maravilha-pdf';
const dir = './images';
const pdf = true;

scrapeScribd(url, dir, pdf)
  .then(() => {
    console.log("Images downloaded and converted to PDF successfully.");
  })
  .catch((error) => {
    console.error("Error:", error.message);
  });