如何在Perl Web爬虫中处理Javascript? [英] How can I handle Javascript in a Perl web crawler?

查看:128
本文介绍了如何在Perl Web爬虫中处理Javascript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想抓取一个网站,问题是,它充满了JavaScript的东西,比如按钮等,当按下它们时,它们不会更改URL,但页面上的数据会发生变化。

I would like to crawl a website, the problem is, that its full of JavaScript things, such as buttons and such that when they are pressed, they do not change the URL, but the data on the page is changed.

通常我使用LWP / Mechanize等来抓取网站,但都不支持JavaScript。
有什么想法?

Usually I use LWP / Mechanize etc to crawl sites, but neither support JavaScript. any idea?

推荐答案

另一种选择可能是 Selenium WWW :: Selenium 模块

Another option might be Selenium with WWW::Selenium module

这篇关于如何在Perl Web爬虫中处理Javascript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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