Closed albertzsigovits closed 5 years ago
Hello @albertzsigovits,
phantomjs
binary in the PATH
variable, such as described here ?--renderer-binary
option by specifying the absolute path to your phantomjs
binary ?Best regards
Input: $ python webscreenshot.py -i web.txt -o web\ -r phantomjs --renderer-binary E:\screen\phantomjs\bin\phantomjs.exe -v
Output: [INFO][General] 'www.xyz' has been formatted as 'http://www.xyz:80' with supplied overriding options [+] 1 URLs to be screenshot [WinError 2] The system cannot find the file specified [ERROR][http://www.xyz:80] renderer binary could not have been found in your current PATH environment variable, exiting
Why is it still trying to look for a PATH variable when --renderer-binary should take precedence?
It is now normaly fixed in https://github.com/maaaaz/webscreenshot/commit/2fe998656c14ef6fb0e5f46ce3dbfafa925f51b6, just make a pip install --upgrade webscreenshot
There were some issues in the way shlex
splits Windows paths.
The --renderer-binary
option, when specified, always take precedence over PATH
.
Cheers.
You rock! Works now.
how can this be done on mac? im having the same problem
For macos use this.
brew tap homebrew/cask brew cask install phantomjs
Got some issue with the PATH env. I'm trying to make it work under Win7.
set PHANTOMJS_BIN="C:\Program Files\phantomjs"
[WinError 2] The system cannot find the file specified [ERROR][http://abc.xyz:80] renderer binary could not have been found in your current PATH environment variable, exiting
Tried with explicitly adding -r phantomjs, or chrome, chromium, none of them work.