wget + JavaScript? [英] wget + JavaScript?

查看:23
本文介绍了wget + JavaScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个网页,它使用客户端 JavaScript 来格式化页面上的数据,然后才显示给用户.

I have this webpage that uses client-side JavaScript to format data on the page before it's displayed to the user.

是否有可能以某种方式使用 wget 下载页面并使用某种客户端 JavaScript 引擎来格式化数据,就像它在浏览器中显示的那样?

Is it possible to somehow use wget to download the page and use some sort of client-side JavaScript engine to format the data as it would be displayed in a browser?

推荐答案

你或许可以使用 PhantomJS

您可以编写一个 phantomjs 脚本,它会像浏览器一样加载页面,然后截取屏幕截图或使用 JS 来检查页面并提取数据.

You can write a phantomjs script that will load the page like a browser would, and then either take screenshots or use JS to inspect the page and pull out data.

这篇关于wget + JavaScript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆