screenshot-stream | Capture screenshot of a website and return | Runtime Evironment library
kandi X-RAY | screenshot-stream Summary
kandi X-RAY | screenshot-stream Summary
Capture screenshot of a website and return it as a stream
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of screenshot-stream
screenshot-stream Key Features
screenshot-stream Examples and Code Snippets
Community Discussions
Trending Discussions on screenshot-stream
QUESTION
I have a simple program I am working on with node.js, the idea was to fetch some websites and show a report, it is for testing web content filtering in a company.
I started struggling with taking the screenshots of the website, when I run my code as node index.js
it works perfectly, it outputs 'google.png' and contains a screenshot of the website (Just as in the screenshot-stream example). However, I compile it using npx pkg index.js -t linux
and it starts giving me errors on execution.
I reduced the program to only this:
...ANSWER
Answered 2018-Oct-01 at 18:27Debugged over this code and found that screenshot-stream module uses
QUESTION
Here is my code:
...ANSWER
Answered 2018-Sep-17 at 13:10What you failed to add here is the error :
events.js:160
throw er; // Unhandled 'error' event ^Error: Couldn't load url: http://techcrunch.com/2012/02/16/auraslate-is-an-open-source-android-tablet-for-hackers/
at LineStream.byline.on.data
(e:---\node_modules\screenshot-stream\index.js:77:16)
at emitOne (events.js:96:13)
at LineStream.emit (events.js:188:7)
The issue is that the module screenshot-stream
is using PhantomJS, and phantomJS is unable to get to the page that outputs the error.
This error seems related to this issue : https://github.com/ariya/phantomjs/issues/10460.
Techcrunch.com and Aol.com seem to use web fonts (e.g. "BebasNeue-webfont.ttf") which Qt loads as application fonts. Something may be going wrong there.
My suggestion is using Google's Puppeteer that includes a built-in screenshot method : https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagescreenshotoptions
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install screenshot-stream
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page