人均:0元
出差北京,看温低-10,立里屯逛逛,偶这家四川冒菜馆。本来抱什么希望,觉得在广州吃太多四川冒菜,果吃惊,超级错哟。食材比较新鲜,肉和菜分开摆放,分开称,肉也是提前有酱拌,调了。煮出来道常好,,强烈推。尤其是和牛肉,两个道煮出来别棒。
curl打开网页403或者302的解决方法
这里我以大众点评网为例
1、浏览器访问:http://www.dianping.com/shop/65334856
我们先说说如何查看Headers的信息
(1)打开对应的网站
(2)按F12键打开调试
(3)选择Network
(4)按F5刷新网页
(5)然后选择左面名称,一般是第一个数字的
2、直接curl访问
curl -v "http://www.dianping.com/shop/65334856"
-v:显示请求详细信息
[root@jerry ~]# curl -v "http://www.dianping.com/shop/65334856"
* About to connect() to www.dianping.com port 80 (#0)
* Trying 203.76.216.1... connected
* Connected to www.dianping.com (203.76.216.1) port 80 (#0)
> GET /shop/65334856 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: www.dianping.com
> Accept: */*
>
< HTTP/1.1 403 Forbidden
< Date: Thu, 20 Dec 2018 03:32:42 GMT
< Content-Type: text/html;charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Keep-Alive: timeout=5
< Vary: Accept-Encoding
< X-Forbid-Reason: .
< Vary: Accept-Encoding
< Content-Language: en-US
< Pragma: no-cache
< Cache-Control: no-cache
< Server: DPweb
<
美食, 餐厅餐饮, 团购,生活,优惠券-大众点评网
关于大众点评| 诚信公约| 网站帮助| 网站地图| 推广服务| 媒体报道| 人才招聘|
最新咨询| 站务论坛| 联系我们| 开发者| 聚宝盆餐饮开放平台
©2003-2018 dianping.com, All Rights Reserved. 本站发布的所有内容,未经许可,不得转载,详见 《知识产权声明》。
* Connection #0 to host www.dianping.com left intact
* Closing connection #0
以上数据中有两个点很重要:
(1)HTTP/1.1 403 Forbidde #表示资源不可用,没有权限访问此站
(2)
抱歉!页面无法访问......
#可以看出页面没有加载
错误信息:
3、先解决403的问题
添加User-Agent(创建请求的浏览器和用户代理名称等信息传达给服务器)信息就可以访问了。
注意:User-Agent信息在浏览器前面打开的Headers的信息最下面
[root@jerry ~]# curl -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36" -v "http://www.dianping.com/shop/65334856"
* Hostname was NOT found in DNS cache
> Host: www.dianping.com
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Thu, 20 Dec 2018 04:08:57 GMT
< Content-Length: 0
< Connection: keep-alive
< Keep-Alive: timeout=5
< Location: http://www.dianping.com/citylist
< Content-Language: en-US
< Pragma: no-cache
< Cache-Control: no-cache
* Server DPweb is not blacklisted
< Server: DPweb
<
* Connection #0 to host www.dianping.com left intact
jerrywang@transfer:~$ curl -v "http://www.dianping.com/shop/65734326"
* Hostname was NOT found in DNS cache
* Trying 203.76.216.1...
* Connected to www.dianping.com (203.76.216.1) port 80 (#0)
> GET /shop/65734326 HTTP/1.1
> User-Agent: curl/7.38.0
> Host: www.dianping.com
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Thu, 20 Dec 2018 04:09:53 GMT
< Content-Length: 0
< Connection: keep-alive
< Keep-Alive: timeout=5
< M-Appkey: com.sankuai.rc.mtsi.optimus
< M-SpanName: OptimusController.optimusAuthorize
< M-TraceId: 7369567874137451512
< Location: https://verify.meituan.com/v2/web/general_page?action=spiderindefence&requestCode=fb54aba8c15c40088b52a764e8d3bbdf&platform=1000&adaptor=auto&succCallbackUrl=https%3A%2F%2Foptimus-mtsi.meituan.com%2Foptimus%2FverifyResult%3ForiginUrl%3Dhttp%253A%252F%252Fwww.dianping.com%252Fshop%252F65734326&theme=dianping
< Pragma: no-cache
< Cache-Control: no-cache
* Server DPweb is not blacklisted< Server: DPweb
<
* Connection #0 to host www.dianping.com left intact
这次还是有两个重要信息:
(1)< HTTP/1.1 302 Found #302代表暂时性转移
(2)< Location: https://verify.meituan.com/v2/web/general_page?action=spiderindefence&requestCode=fb54aba8c15c40088b52a764e8d3bbdf&platform=1000&adaptor=auto&succCallbackUrl=https%3A%2F%2Foptimus-mtsi.meituan.com%2Foptimus%2FverifyResult%3ForiginUrl%3Dhttp%253A%252F%252Fwww.dianping.com%252Fshop%252F65734326&theme=dianping #这个就是跳转的网页
我们浏览器打开跳转的网页看看,原来是让验证,如何跳过验证呢,继续往下看
https://verify.meituan.com/v2/web/general_page?action=spiderindefence&requestCode=fb54aba8c15c40088b52a764e8d3bbdf&platform=1000&adaptor=auto&succCallbackUrl=https%3A%2F%2Foptimus-mtsi.meituan.com%2Foptimus%2FverifyResult%3ForiginUrl%3Dhttp%253A%252F%252Fwww.dianping.com%252Fshop%252F65734326&theme=dianping
4、解决302跳转
添加cookie信息就可以访问了。
注意:cookie信息在浏览器前面打开的Headers的信息Request Headersview source下 #请求头视图源
[root@jerry ~]# curl -cookie "_lxsdk_cuid=167c9aa6114c8-0a767bfa958c85-6313363-1fa400-167c9aa61154e; _lxsdk=167c9aa6114c8-0a767bfa958c85-6313363-1fa400-167c9aa61154e; _hc.v=e410126e-1782-9469-7026-539f8d9d3d56.1545276646; cy=2; cye=beijing; s_ViewType=10; _lxsdk_s=167c9aa6119-9a2-e70-bcb%7C%7C226" -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36" -v "http://www.dianping.com/shop/22974252"
* getaddrinfo(3) failed for _lxsdk_cuid=167c9aa6114c8-0a767bfa958c85-6313363-1fa400-167c9aa61154e; _lxsdk=167c9aa6114c8-0a767bfa958c85-6313363-1fa400-167c9aa61154e; _hc.v=e410126e-1782-9469-7026-539f8d9d3d56.1545276646; cy=2; cye=beijing; s_ViewType=10; _lxsdk_s=167c9aa6119-9a2-e70-bcb%7C%7C226:80
* Couldn't resolve host '_lxsdk_cuid=167c9aa6114c8-0a767bfa958c85-6313363-1fa400-167c9aa61154e; _lxsdk=167c9aa6114c8-0a767bfa958c85-6313363-1fa400-167c9aa61154e; _hc.v=e410126e-1782-9469-7026-539f8d9d3d56.1545276646; cy=2; cye=beijing; s_ViewType=10; _lxsdk_s=167c9aa6119-9a2-e70-bcb%7C%7C226'
* Closing connection #0
curl: (6) Couldn't resolve host '_lxsdk_cuid=167c9aa6114c8-0a767bfa958c85-6313363-1fa400-167c9aa61154e; _lxsdk=167c9aa6114c8-0a767bfa958c85-6313363-1fa400-167c9aa61154e; _hc.v=e410126e-1782-9469-7026-539f8d9d3d56.1545276646; cy=2; cye=beijing; s_ViewType=10; _lxsdk
* About to connect() to www.dianping.com port 80 (#0)
* Trying 203.76.216.1... connected
* Connected to www.dianping.com (203.76.216.1) port 80 (#0)
> GET /shop/22974252 HTTP/1.1
> User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
> Host: www.dianping.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Thu, 20 Dec 2018 04:18:05 GMT
< Content-Type: text/html;charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Keep-Alive: timeout=5
< M-SpanName: /shop/{num}
< M-TraceId: 1068949537692350265
< Accept-Ranges: bytes
< Content-Encoding: UTF-8
< ETag: "5844cbf24132f867d91746a71dbfb653"
< Last-Modified: Thu, 20 Dec 2018 01:00:11 GMT
< X-Mss-Trace-Id: 5485949940881798827
< x-amz-storage-class: 3R
< Pragma: no-cache
< Cache-Control: no-cache
< Server: DPweb
< Vary: User-Agent, Accept-Encoding
<
【脑馋粉儿(三里屯店)】电话,地址,价格,营业时间(图) - 北京美食 - 大众点评网 脑馋粉儿(三里屯店) 手机买单 积分抵现 其它3家分店
1 条评论 星级来自业内综合评估 人均: 元 口味: . 环境: . 服务: . 地址: 院 里屯SOHO 商 B1 B1- 电话: 1 - 1
更多信息 营业时间: 11:-: 1--11-- 修改
网友点评(1923)
-
-
-
-
-
-
人均:0元
打卡➕拔草~
确实去的点儿 周六的上点钟
人多 坐的置
自选择菜…荤分开放
因一个人去的 吃的并......
展开评论 打卡➕拔~
实儿 周上八钟
人多 坐位置
自助择…荤素分开
因人 并多 了?
还要了柠檬
共十钱 柠檬八儿贵 因就全以买~
「麻辣肉」候经罄了 再吧
「鸡脆骨」欢 但知道什么 太脆哦
「午餐肉」特 推
「鸭血」超爱鸭血 推
「冬瓜」入儿 而且大
另外还些「土豆」「豆芽」「藕片」「脆豆腐」「原生」「花」
每多 怕浪费
?也满满 因饿
调料香 麻酱 花生碎 干辣椒 自助
桌上 蚝~
颗星因曲 当店里只人 和 付调料 务给了饮料 就找桌等了 过会儿 务着问了前面桌 他 人看了 :“冬瓜” 然就声:“冬瓜了 ” 着务声音大 啊 然给了……之也直在 实 但实 务嗓门儿大到所人看…………
而只想人口而[][]
就在收银台弄料 人给弄好像忘样
[环境]好 欢暖暖光~
[务]言尽 还和朋吧[羞][羞]
收起评论 - 喜欢的菜:
- 鸡脆骨
- 该店适合:
- 价格实惠
- foodShopFitIds:
- 316499.0
-
-
-
-
大众点评北京快餐简餐频道为您提供脑馋粉儿(三里屯店)地址,电话,最新菜单等最新商户信息,找北京美食,就上大众点评。