Skip to content

shuvosvc/puppeteer-node-express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

puppeteer-node-express

A simple Node.js and Express project using Puppeteer for web scraping, automation, screenshots, and PDF generation.

Getting Started

Prerequisites

  • Node.js and npm installed
  • Puppeteer dependencies: Run npx puppeteer install to download the necessary browser binaries.

Installation

  1. Clone the repository: git clone https://github.com/yourusername/puppeteer-node-express.git cd puppeteer-node-express

  2. Install dependencies: npm install

  3. Run the application: npm start

The server will be running at http://localhost:3000.

Endpoints

  1. Scrape Endpoint: POST /puppeteer/scrape Request Body: { "url": "https://example.com" } Response: { "title": "Example Domain", "links": ["https://example.com/another-page", "https://example.com/some-other-page"] }

  2. Take Screenshot Endpoint: POST /puppeteer/screenshot Request Body: { "url": "https://example.com" } Response: Binary image data (PNG).

  3. Generate PDF Endpoint: POST /puppeteer/pdf

Request Body: { "url": "https://example.com" } Response Binary PDF data.

  1. Web Automation Endpoint: POST /puppeteer/automation Request Body: { "url": "https://example.com" } Response: { "message": "Web automation completed successfully." }

Contributing:

Feel free to contribute to this project by opening issues or submitting pull requests.

License:

This project is licensed under the MIT License

This README.md provides basic information on installation, endpoints, contributing, and licensing. Adjust the content based on your project's specifics. Feel free to expand and customize as needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors