httpscreenshot icon indicating copy to clipboard operation
httpscreenshot copied to clipboard

Put screenshots in a directory

Open DanMcInerney opened this issue 9 years ago • 4 comments

How do you feel about putting all the screenshots in a directory rather than just putting them in the folder that the script was run from? Seems like this would make for a whole lot less clutter. Unrelated, have you had phantomjs work in Kali? I'm updated to the latest selenium and I followed the instructions for symlinking phantomjs to bin, but I still get :

"Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.del of <selenium.webdriver.phantomjs.service.Service object at 0x209afd0>> ignored Message: Unable to start phantomjs with ghostdriver."

DanMcInerney avatar Mar 19 '15 20:03 DanMcInerney

I think we could have a switch for putting them in a directory, usually we just run it from the directory we want the screenshots to end up in, but I see what you mean.

PhantomJS will work on Kali. Are oyu sure it's properly symlinked? If you type "phantomjs" on the commandline, does it run? The offending line of code in httpscreenshot would be this one:

141: browser = webdriver.PhantomJS(service_args=['--ignore-ssl-errors=true','--ssl-protocol=tlsv1'], executable_path="phantomjs")

If you change executable_path="phantomjs" to executable_path="/your/path/to/phantonjs" that might do it...

breenmachine avatar Mar 19 '15 22:03 breenmachine

Yeah, I just don't think I've ever run it without first doing mkdir screenshots figured other people probably do the same thing. As for phantomjs, I had the symlink there in my path but I hadn't refreshed my terminal so that's all good; I figured it was something on my end which is why I didn't make a whole new issue. Thanks for the help.

DanMcInerney avatar Mar 19 '15 22:03 DanMcInerney

So it sounds like an argument needs to be added to specify the output directory for screenshots with a default option of current directory?

RyPeck avatar Mar 19 '15 22:03 RyPeck

That sounds good to me.

On Thu, Mar 19, 2015 at 4:27 PM, Ryan John Peck [email protected] wrote:

So it sounds like an argument needs to be added to specify the output directory for screenshots with a default option of current directory?

— Reply to this email directly or view it on GitHub https://github.com/breenmachine/httpscreenshot/issues/10#issuecomment-83785929 .

DanMcInerney avatar Mar 19 '15 22:03 DanMcInerney