Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用inspect元素或firebug进行Python抓取_Python_Web Scraping_Firebug_Webpage_Inspect Element - Fatal编程技术网

使用inspect元素或firebug进行Python抓取

使用inspect元素或firebug进行Python抓取,python,web-scraping,firebug,webpage,inspect-element,Python,Web Scraping,Firebug,Webpage,Inspect Element,在我学习这个youtube抓取教程的过程中,我被介绍到,与其从“公共”页面抓取大量其他内容,不如找到一个“私有”页面,使用inspect element/firebug更高效地抓取必要的信息 google chrome > inspect element > network > XHR youtube视频中的人以股票价格为例,能够找到一个“私人”页面,以快速、低强度地抓取到服务器。尽管当我试图查看我想要抓取的站点时,例如,通过inspect元素(chrome)>Network

在我学习这个youtube抓取教程的过程中,我被介绍到,与其从“公共”页面抓取大量其他内容,不如找到一个“私有”页面,使用inspect element/firebug更高效地抓取必要的信息

google chrome > inspect element > network > XHR
youtube视频中的人以股票价格为例,能够找到一个“私人”页面,以快速、低强度地抓取到服务器。尽管当我试图查看我想要抓取的站点时,例如,通过inspect元素(chrome)>Network>XHR>检查标题的请求URL和预览,我似乎没有发现任何有用的东西


我错过什么了吗?如何确保原始信息或压缩信息隐藏在某处?以Rottentomotos.com页面为例,我如何判断是否有1)提供电影标题和年份的“私人页面”和2)在一个页面中“存储”所有电影标题和年份的摘要页面(类似csv格式)?

如果页面动态加载数据,则只能找到XHR请求。在您的示例中,唯一值得注意的是以下URL:

其中包含一些关于电影的JSON信息

{"media":{"type":"movie","id":771355871,"title":"Grigris","url":"http://www.rottentomatoes.com/m/grigris/","year":2014,"mpaa":"Unrated","runtime":"1 hr. 40 min.","synopsis":"Despite a bum leg, 25-year-old Grigris has hopes of becoming a professional dancer, making some extra cash putting his killer moves to good use on the...","thumbnail":"http://content6.flixster.com/movie/11/17/21/11172196_mob.jpg","cast":[{"name":"Souleymane Démé","id":"771446344"},{"name":"Anaïs Monory","id":"771446153"}]}}
加载站点时,请确保已打开chrome developer工具。如果没有,开发人员工具不会捕获任何请求。您可以打开它们并刷新页面,然后在XHR过滤器下可以看到它们