请问大家 HTTP 错误代码 418 是什么意思呢

2019-07-07 17:09:10 +08:00
 limyel

写爬虫爬微博的时候返回的错误,我搜到是说一个彩蛋...... 但是没看懂什么意思呀,而且为什么会触发 418 呢。

27149 次点击
所在节点    Python
13 条回复
lcdtyph
2019-07-07 17:17:59 +08:00
因为触发了反爬…
visualbasic
2019-07-07 23:10:05 +08:00
因为你和 618 只差一个 HTTP 200 ……
lonelinsky
2019-07-08 01:57:48 +08:00
418 I'm a teapot

The HTTP 418 I'm a teapot client error response code indicates that the server refuses to brew coffee because it is a teapot. This error is a reference to Hyper Text Coffee Pot Control Protocol which was an April Fools' joke in 1998.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418

所以就如 1L 所说,你触发了反爬,微博的程序员就返回这个和你开个玩笑 :-)
ydirel
2019-07-08 03:16:45 +08:00
我是个茶壶
limyel
2019-07-08 09:34:06 +08:00
@lonelinsky 原来是这样的彩蛋.....
december
2019-07-08 10:07:44 +08:00
哈哈,看到 418 我就猜到是微博了。
fank99
2019-07-08 10:41:59 +08:00
之前爬其他网站也遇到过 418。。触发反爬了
dai123456
2019-07-08 11:20:37 +08:00
发爬了,你的 ip 使用的是太多了吗?一种是使用代理,一种是编写个发爬的程序
limyel
2019-07-08 13:58:30 +08:00
@december 对啊,最近想爬蔡徐坤的粉丝来着😂
limyel
2019-07-08 13:58:55 +08:00
@december 对啊,最近想爬 cxk 的粉丝来着😂
limyel
2019-07-08 14:00:14 +08:00
@dai123456 没错,IP 的问题..我今天试试代理
dai123456
2019-07-08 16:43:30 +08:00
专业爬虫代理,我可以帮你推荐一下
dai123456
2019-07-17 13:56:39 +08:00
@limyel 专业爬虫代理,我可以帮你推荐一下

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/580763

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX