Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luigiimvector/capture-website-api
Node.js API to get screenshot of websites
https://github.com/luigiimvector/capture-website-api
api capture-screenshots curl nodejs screenshots website-screenshot
Last synced: 18 days ago
JSON representation
Node.js API to get screenshot of websites
- Host: GitHub
- URL: https://github.com/luigiimvector/capture-website-api
- Owner: LuigiImVector
- License: mit
- Created: 2022-08-22T12:10:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-22T17:19:57.000Z (about 2 years ago)
- Last Synced: 2024-11-15T05:52:10.127Z (3 months ago)
- Topics: api, capture-screenshots, curl, nodejs, screenshots, website-screenshot
- Language: JavaScript
- Homepage: http://167.172.107.45:8000/getImage
- Size: 2.15 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Capture website API
APIs list:
method | path | params | result
---- | ---- | ------ | ------
GET | `/getImage` | `?url=https://github.com/LuigiImVector/` | screenshot of that website (1920x1080)> NOTE ❗
> Write the URL with `https://` or `http://`### Deploy
1. Clone the repository
2. Install dependencies: `npm install`
3. Run: `npm run test`
4. Go to: `localhost:8000`...#### Testing using cURL (and ngrok)
Install [ngrok](https://ngrok.com) and write:
```sh
ngrok http 8000
```Save the url, for example:
```
Forwarding https://8c9b-151-54-23-194.eu.ngrok.io -> http://localhost:8000
```Install [cURL](https://curl.se) and write:
```sh
curl -o screenshot.png https://8c9b-151-54-23-194.eu.ngrok.io/getImage?url=https://socus.netlify.app/
```### Support:
Open an issue, if you want to contribute open a PR.### Related:
- Use this website to get custom screenshot: https://github.com/LuigiImVector/scrnsht/ (coming soon)### Credits (libs used):
- https://github.com/sindresorhus/capture-website
- https://github.com/ogt/valid-url
- https://github.com/broofa/mime