Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anonymous961/scrapebooks
Just a repo to check puppeteer
https://github.com/anonymous961/scrapebooks
neondb prisma puppeteer typescript
Last synced: 11 days ago
JSON representation
Just a repo to check puppeteer
- Host: GitHub
- URL: https://github.com/anonymous961/scrapebooks
- Owner: Anonymous961
- Created: 2024-06-10T16:37:12.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-10T16:55:18.000Z (5 months ago)
- Last Synced: 2024-10-17T22:28:38.000Z (29 days ago)
- Topics: neondb, prisma, puppeteer, typescript
- Language: TypeScript
- Homepage: https://scrapebooks.onrender.com
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Scrape Book
This is just a repo to scrape books from https://books.toscrape.com/ using puppeteer.
## local development setup
```
npm i //to install dependencies
```to run the server
```
npm run dev
```## Endpoint
| Method | URL | Description |
| ------ | --------- | -------------------------------- |
| `GET` | `/books` | Retrieve all books stored in DB. |
| `POST` | `/scrape` | To scrape all the books. |## Using pages
| Endpoint | Description |
| --------------- | ------------------------------------------------------ |
| `/books` | Initial request. Return first 50 books. |
| `/books?page=2` | Second page, returning 50 books using an offset of 50. |
| `/bokos?page=3` | Third page, returning 50 books using an offset of 100. |