Domain does not gets formatted automatically due to which command fails
I tried to execute it from within a python code but it kept failing. I tried took the DEBUG output and matched it wih when the command is run directly from shell.
I tcame out to be that when I provide a list of domains from within another python code then the domains aren't being converted from google.com to http://google.com:80 due to which the command fails.
Screenshot when ran inside python

Screenshot when ran directly

Hello @hellrider9,
It fails because the list of targets you pass (through lines variable) is not properly parsed and formatted. You should pass lines like http://google.com and not google.com :
- Look at the
url_listitems' format in the sample code - When you run through CLI, the inputs are first parsed with this function, that explains why it is successful in your case https://github.com/maaaaz/webscreenshot/blob/16e5c2a7448a9cb3248074de287c30a86c6974b6/webscreenshot.py#L639
In a next release, I will upgrade the parse_targets function to be able to accept to parse a programmatic list as parameter, not only the options parameter, and then update the wiki.
Basically after this change:
- This
url_list = ['http://google.fr', 'http://google.com'] - Will then become
url_list = parse_targets(custom_list=['http://google.fr', 'http://google.com'])
Cheers.
Thanks.
Just for the heads up, when can I expect then next release.