CutyCapt with javascript enabled
I am trying to capture html page using cutycapt executabl开发者_JAVA百科e, the issue is when I am setting javascript on and sending some querystring values along with the url
like - http://www.xyz.com/home.html?t=1
I have written a javascript function which gets called on load of the page, and I am using that function to populate a textbox with the querystring value that's passed in the url.
Now the thing is the screen-shot that gets generated is not executing the javascript function at all.
Is there any workaround for this
As from reading usage documentation I would preffer setting these variables
--delay
to 1-5 seconds (depends on how lenghty javascript operations are)--plugins
toon
--javascript
toon
(better to explicitly declare it)--js-can-access-clipboard
toon
(if your script uses clipboard)--java
toon
(optional)
.
% CutyCapt --help
-----------------------------------------------------------------------------
Usage: CutyCapt --url=http://www.example.org/ --out=localfile.png
-----------------------------------------------------------------------------
--help Print this help page and exit
--url=<url> The URL to capture (http:...|file:...|...)
--out=<path> The target file (.png|pdf|ps|svg|jpeg|...)
--out-format=<f> Like extension in --out, overrides heuristic
--min-width=<int> Minimal width for the image (default: 800)
--min-height=<int> Minimal height for the image (default: 600)
--max-wait=<ms> Don't wait more than (default: 90000, inf: 0)
--delay=<ms> After successful load, wait (default: 0)
--user-styles=<url> Location of user style sheet, if any
--header=<name>:<value> request header; repeatable; some can't be set
--method=<get|post|put> Specifies the request method (default: get)
--body-string=<string> Unencoded request body (default: none)
--body-base64=<base64> Base64-encoded request body (default: none)
--app-name=<name> appName used in User-Agent; default is none
--app-version=<version> appVers used in User-Agent; default is none
--user-agent=<string> Override the User-Agent header Qt would set
--javascript=<on|off> JavaScript execution (default: on)
--java=<on|off> Java execution (default: unknown)
--plugins=<on|off> Plugin execution (default: unknown)
--private-browsing=<on|off> Private browsing (default: unknown)
--auto-load-images=<on|off> Automatic image loading (default: on)
--js-can-open-windows=<on|off> Script can open windows? (default: unknown)
--js-can-access-clipboard=<on|off> Script clipboard privs (default: unknown)
--print-backgrounds=<on|off> Backgrounds in PDF/PS output (default: off)
-----------------------------------------------------------------------------
<f> is svg,ps,pdf,itext,html,rtree,png,jpeg,mng,tiff,gif,bmp,ppm,xbm,xpm
-----------------------------------------------------------------------------
精彩评论