a2melbourne 发表于 2016-2-29 09:50:32

无法从源代码中采集数据_2

各位大神,之前我发了一个帖子,当时发现网页可以看到源代码,但是在采集器里面测试的时候看不到。下面是测试结果中的返回头信息(然后源代码为空):

HTTP/1.1 302 Found
Date:Mon, 29 Feb 2016 01:44:01 GMT
Content-Type:text/html;charset=UTF-8
Set-Cookie:JSESSIONID=bbt5w28i8km8y9d2xap4zsmm;Path=/,URI="/intraday.jsp?id=224&sid=1381&dt=20160129";Expires=Sun, 24-Feb-2036 01:44:01 GMT
Expires:Thu, 01 Jan 1970 00:00:00 GMT
Location:http://www.pvoutput.org/login.jsp
Content-Length:0
Server:Jetty(7.6.17.v20150415)

下面是可以成功测试到源代码的返回头信息:

HTTP/1.1 200 OK
Date:Mon, 29 Feb 2016 01:47:59 GMT
Content-Type:text/html;charset=UTF-8
Set-Cookie:JSESSIONID=3c2mukrpuwaf1etdnbsl79aoo;Path=/,URI="/intraday.jsp?id=224&sid=1381&dt=20160131";Expires=Sun, 24-Feb-2036 01:47:59 GMT
Expires:Thu, 01 Jan 1970 00:00:00 GMT
Content-Encoding:gzip
Vary:Accept-Encoding, User-Agent
Transfer-Encoding:chunked
Server:Jetty(7.6.17.v20150415)
Content-Length:88381

而且发现,只能成功获取到之前一个月的网页源代码,再往前就不行了。这个需要特别设置http请求吗?如果需要,怎么搞?实在不懂,哪位大神给指点一下吧!!

页: [1]
查看完整版本: 无法从源代码中采集数据_2