首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >启用javascript的CutyCapt

启用javascript的CutyCapt
EN

Stack Overflow用户
提问于 2011-09-10 04:54:31
回答 1查看 2.1K关注 0票数 1

我试图使用cutycapt可执行文件捕获html页面,问题是当我设置javascript并发送一些querystring值和url时。

类- http://www.xyz.com/home.html?t=1

我编写了一个javascript函数,该函数在页面加载时被调用,我正在使用该函数来使用在url中传递的querystring值填充一个文本框。

现在问题是生成的屏幕截图根本没有执行javascript函数。

有什么解决办法吗?

EN

回答 1

Stack Overflow用户

发布于 2011-09-10 06:24:31

通过阅读使用文档,我会预先设置这些变量。

  • --delay到1-5秒(取决于如何宽大的javascript操作are)
  • --pluginson
  • --javascripton (最好是将it)
  • --js-can-access-clipboard显式声明为on )(如果脚本使用clipboard)
  • --javaon (可选)

)。

代码语言:javascript
运行
复制
% 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
 -----------------------------------------------------------------------------
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7369709

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档