我从不使用 python。我唯一知道的语言是 JavaScript。我使用 node 来做网络工作,我一直在阅读有关 casper.js 如何抓取网页的信息。所以我想我可以像往常一样使用它。现在我正要安装它,但我得到 'python' 未被识别为内部或外部命令、可运行程序或批处理文件。
我知道这意味着将 python 放在我的路径上。我不想安装 python。
我使用 JavaScript 为什么要安装 python?我只是感到困惑,因为 casper.js
最后有一个 js
我认为它会依赖 js
而不是 python。所以你能确认我是否真的需要安装 python 吗?我现在真的不想处理另一种语言。流程简单吗?
最佳答案
是的,casper.js 需要 Python:http://docs.casperjs.org/en/latest/installation.html
PhantomJS 1.9.1 or greater. Please read the installation instructions for PhantomJS
Python 2.6 or greater for casperjs in the bin/ directory
但是,您的所有编码 都将使用 JavaScript。您不必(事实上,不能)用 Python 编写 CasperJS 脚本。
关于javascript - 你需要 python 来使用 casper.js 吗?如果是,为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36392978/