
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@apilayer/screenshotlayer
Advanced tools
Screenshotlayer: Capture highly customizable snapshots of any website
Screenshotlayer: Capture highly customizable snapshots of any website
Using npm
npm install --save @apilayer/screenshotlayer
or yarn
yarn add @apilayer/screenshotlayer
Head over to Screenshotlayer and create an account. Copy access key from dashboard.
You can set a secret key from the dashboard or just use an empty string.
import screenshotlayer from '@apilayer/screenshotlayer'
const useHTTPs = false
const layer = new screenshotlayer("<your-access-key>", "<your-secret-key>", useHTTPs)
capture
capture
creates a valid screenshot URL
Signature:
capture(site: string, config: Config = null): string
Example:
const response = layer.capture("https://apilayer.com")
console.log("response:", response)
Response:
"http://api.screenshotlayer.com/api/capture
?access_key=<your-access-key>
&url=https://apilayer.com
&viewport=1440x900
&format=PNG"
Alternatively, you can specify a Config
object as
the second parameter. Supported properties include:
Parameter | Description |
---|---|
fullPage | set to true if you want to capture the full height of the target website |
width | specify your preferred thumbnail width in pixels |
vHeight | specify your preferred viewport height dimensions in pixels |
vWidth | specify your preferred viewport width dimensions in pixels |
format | set your preferred image output format (PNG |
injectCSS | attach a URL containing a custom CSS stylesheet |
delay | specify a delay before screenshot is captured (in seconds) |
tTL | define the time (in seconds) your snapshot should be cached |
force | set to true if you want to force the API to capture a fresh screenshot |
placeholder | attach a URL containing a custom placeholder image or set to "1" |
userAgent | specify a custom User-Agent HTTP header to send with your request |
acceptLang | specify a custom Accept-Language HTTP header to send with your request |
export | export snapshot via custom ftp path or using your AWS S3 user details |
FAQs
Screenshotlayer: Capture highly customizable snapshots of any website
The npm package @apilayer/screenshotlayer receives a total of 1 weekly downloads. As such, @apilayer/screenshotlayer popularity was classified as not popular.
We found that @apilayer/screenshotlayer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.