你能刮一个Angular JS网站吗 [英] Can you scrape a Angular JS website

查看:75
本文介绍了你能刮一个Angular JS网站吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这被标记为主题,但如果有人有同样的问题,则留在堆栈溢出中.

This was marked off-topic but left on Stack Overflow in case someone else has this same question.

这可能超出范围,但我很好奇您是否可以抓取Angular JS网站?

This may be out of scope but I was curious to know if you could scrape a Angular JS website?

如果可以的话,有人可以向我指出一些好的资源吗?我做了一些R& D,但除了Phantom JS找不到任何有用的资源

If you can can someone point me to some good resources? I did some R & D but could not find any useful resources besides Phantom JS

推荐答案

这个问题的最简单答案是肯定的,这是可能的,但不能使用仅查看原始文本内容的传统bot. HTTP响应主体,并没有真正解释运行JavaScript的典型浏览器会看到什么. Google做到了(截至2014年5月): http://googlewebmastercentral.blogspot.com/2014/05/understanding -web-pages-better.html

The simplest answer to this question is yes, it is possible, but not using traditional bots that only look at the raw textual content that they'd get in the HTTP response body and don't really interpret what a typical browser running JavaScript would see. Google does it (as of May 2014): http://googlewebmastercentral.blogspot.com/2014/05/understanding-web-pages-better.html

如果您有一个能够解析javascript并允许正常的http xhr请求发出并获取填充SPA的实际数据的漫游器,则可以抓取一个Angular网站.

If you have a bot that parses javascript and allows the normal http xhr requests to go out and get the actual data that populates a SPA, you can scrape an Angular site.

这篇关于你能刮一个Angular JS网站吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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