stacker.news/spawn/capture.js

13 lines
272 B
JavaScript
Raw Normal View History

#!/usr/bin/node
const Pageres = require('pageres')
async function captureUrl () {
2021-11-23 18:35:10 +00:00
const streams = await new Pageres({ crop: true, timeout: 5 })
.src(process.argv[2], ['600x314'])
.run()
process.stdout.write(streams[0], () => process.exit(0))
}
captureUrl()