1
yuankui 2016-05-30 17:56:50 +08:00
|
2
xiahei 2016-05-30 17:59:35 +08:00
买代理用代理爬。
|
3
Gary_Cheung OP @yuankui 具体的股票页面,比如: https://xueqiu.com/S/SZ000001
|
4
yuankui 2016-05-30 18:02:58 +08:00
curl -X "GET" "https://xueqiu.com/S/SZ000001" \
-H "Accept: */*" \ -H "Accept-Encoding: gzip, deflate, sdch" \ -H "Connection: keep-alive" \ -H "Cookie: s=2o2m12630i; xq_a_token=934f674c5167ef0a40bc92c387554e5b8d74a6f8; xq_r_token=ed5549c6fd48ab1fbe3f40b00a823b21dbd4f618" \ -H "Host: xueqiu.com" \ -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36" \ -H "Accept-Language: zh-CN,zh;q=0.8" |
5
yuankui 2016-05-30 18:03:31 +08:00
我本地用 curl 是可以的。
估计你的 ip 访问太多了,被封了吧。 如二楼,买代理~淘宝一堆一堆的。。 |
6
XYxe 2016-05-30 18:36:27 +08:00 1
headers = {
'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Language':'zh-CN,zh;q=0.8', 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36', 'Host':'xueqiu.com' } 至少要把这些加到 headers 里面。 |
7
jiezhi 2016-05-30 18:41:02 +08:00 via iPhone
模拟像一点就去浏览器里把头信息全部加上去,然后控制下访问频率吧
|
8
coolloves 2016-05-31 06:35:09 +08:00 via Android
看来雪球在这两天有点动作,我的爬虫两个月都没事,上周六开始一直 403 ,被 ban 了,刚好借机会学习代理,又开始爬代理了
|
9
v2ex_user001 2016-05-31 09:12:43 +08:00
httpget.addHeader("Accept-Language", "zh-CN,zh;q=0.8,en;q=0.6");
|
10
youxiachai 2016-05-31 14:44:15 +08:00
开始反爬虫了吧...lz 还是用代理池吧...
|