getscreenshot.js
Version:
Website screenshot getter. (No api key, No limit, 100% free)
80 lines (56 loc) • 2.28 kB
Markdown
<p align="center">
<a href="https://www.npmjs.com/package/getscreenshot.js" rel="noopener">
<img width=100px height=100px src="https://play-lh.googleusercontent.com/_hNqSzAVIx5jNvxATP3V5grf5lBMvHSZ5IqbyHJA_wHbS2lGXVntocuokRPaOs0D9A" alt="VihangaYT NPMs"></a>
</p>
<h2 align="center">WEB ScreenShot</h2>
<div align="center">
[]()
[](https://github.com/SL-CODE-LORDS/Web-Screenshot/issues)
[](https://github.com/SL-CODE-LORDS/Web-Screenshot/pulls)
[](/LICENSE)
</div>
---
<p align="center"> takes a screenshot of a website or web page and saves it as a image file.
<br>
</p>
- [About](
- [Getting Started](
- [Usage](
- [Owner](https://vihanga.is-a.dev/)
- [Apis](https://vihangayt.is-a.dev/)
This project takes a screenshot of a website or web page and saves it as a image file. The screenshot can be taken of the entire page or of a specific region.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes
```sh
yarn add getscreenshot.js
```
or
```sh
npm i getscreenshot.js
```
```ts
const {
screenshotV1, // Buffer
screenshotV2, // Buffer
screenshotV3 // Link
} = require('getscreenshot.js')
const fs = require('fs')
```
```ts
// Screenshot V1 (buffer)
var data = await screenshotV1('https://github.com/')
fs.writeFileSync('vihanga.png',data)
// Screenshot V2 (buffer)
var data = await screenshotV2('https://github.com/')
fs.writeFileSync('vihanga.png',data)
// Screenshot V3 (link)
var data = await screenshotV1('https://github.com/')
console.log(data)
```
- [@vihangayt0](https://github.com/vihangayt0) Project Author