本文介绍了网页抓取 JAVASCRIPT 内容的语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为主题提出了问题,我通常使用 PHP 进行解析/网页抓取,但是我在抓取 javascript 的时候真的很糟糕,大多数情况下我做不到

I think topic ask the question, I usually use PHP for parse/ web scraping, but I have really bad time scraping javascript most cases I cant do it

例如:解析执行 javascript 时出现的 div.

ex: Parse a div that appears when a javascript its executed.

我读过关于 RUBY 的文章,它有一个用于 javascript 的解析器库,所以问题是 w 是编程网络抓取的语言,它可以有效地废弃 javascript 生成的内容?这里有一个 PHP 库,就像 ruby​​ 用于解析 javascript 内容的库一样?

I readed about RUBY, that have a parser library for javascript, so question is w is the languaje for program a web scraping that will effective scrap javascript generated content ?? Its here a library for PHP like the one for ruby for parse javascript content ?

推荐答案

在 ruby​​ 世界中,运行 Phantomjs 的宝石是 恶作剧

In the ruby world the gem for running Phantomjs would be poltergeist

还有另一篇文章介绍了您在 ruby​​ 中的一些选项 这里也是(但它们并非都支持 js)

There is another article about some of the options you have in ruby here too (however they are not all js capable)

这篇关于网页抓取 JAVASCRIPT 内容的语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 02:57
查看更多