Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qrstuff/screenshuttle
Capture screenshot of webpage in full or a specific node and return them as JPEG, PNG or even PDFs.
https://github.com/qrstuff/screenshuttle
chrome chromium docker puppeteer screen-capture screenshot
Last synced: about 1 month ago
JSON representation
Capture screenshot of webpage in full or a specific node and return them as JPEG, PNG or even PDFs.
- Host: GitHub
- URL: https://github.com/qrstuff/screenshuttle
- Owner: qrstuff
- License: mit
- Created: 2024-06-04T10:16:13.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-08T09:17:30.000Z (4 months ago)
- Last Synced: 2024-09-30T15:17:41.138Z (about 2 months ago)
- Topics: chrome, chromium, docker, puppeteer, screen-capture, screenshot
- Language: JavaScript
- Homepage: https://qrstuff.com/
- Size: 91.8 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# screenshuttle
This project provides a service to capture screenshots or PDFs of web pages using AWS Lambda and Puppeteer.
The service can be configured to capture specific elements, hide certain elements, and set custom dimensions and formats for the output.## Usage
Clone the project and install dependencies (only required for code-completion) using [Yarn](https://yarnpkg.com/):
```shell
yarn install
```Build and run the [Docker](https://www.docker.com/) image:
```shell
# build Docker image
docker build -t screenshuttle .# start a test container
docker run -it --rm -p 8080:8080 screenshuttle
```Test [Lambda](https://aws.amazon.com/lambda/) execution by sending a test event:
```shell
curl -X POST "http://127.0.0.1:8080/2015-03-31/functions/function/invocations" -H "content-type: application/json" -d '{"url": "http://example.com/"}'
```There are more options supported by handler than you can pass as event data e.g., as below:
```json
{
"url": "http://example.com/",
"exclude": ["#hide-me", ".hide-me-too"],
"format": "jpeg", # one of jpeg, pdf or png
"fullpage": true,
"selector": "#only-me",
"width": 1280,
"heigt": 720
}
```## License
See the [LICENSE](LICENSE) file for details. Made with ❤️ at [QRStuff](https://qrstuff.com/).