
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
capture-electron
Advanced tools
Capture screenshots using electron.
DOMContentLoadedpng, jpg and bmpCapture a 800x600 screenshot of github.com:
const capture = require('capture-electron')
const fs = require('fs')
capture({
url: 'https://github.com/',
width: 800,
height: 600
}).then(screenshot => {
fs.writeFileSync(`${__dirname}/example.png`, screenshot)
console.log('open example.png')
})

Capture a screenshot of url, returns a Promise which resolves with a buffer.
Options:
url Page urlwidth Viewport widthheight Viewport heightwait Time in ms to wait after the DOMContentLoaded eventformat File format (png, jpg, bmp)Takes the same options as above, but returns a stream instead.
Example:
capture
.stream({
url: 'https://github.com/',
width: 800,
height: 600
})
.pipe(fs.createWriteStream(`${__dirname}/example-stream.png`))
.on('close', () => console.log('open example-stream.png'))
With npm do:
npm install capture-electron
This project requires an xvfb setup to be running in your CI environment.
For an example how to set one up, check out the .travis.yml.
After that, no further setup is required however, as the electron executable is
installed automatically.
This module is proudly supported by my Sponsors!
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my Patreon. Not sure how much of my modules you're using? Try feross/thanks!
(MIT)
Copyright (c) 2017 Julian Gruber <julian@juliangruber.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Capture screenshots using electron
The npm package capture-electron receives a total of 30 weekly downloads. As such, capture-electron popularity was classified as not popular.
We found that capture-electron demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.