推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
limyel
V2EX  ›  Python

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

  •  
  •   limyel · Jul 7, 2019 · 28336 views
    This topic created in 2534 days ago, the information mentioned may be changed or developed.

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

    13 replies    2019-07-17 13:56:39 +08:00
    lcdtyph
        1
    lcdtyph  
       Jul 7, 2019 via iPhone
    因为触发了反爬…
    visualbasic
        2
    visualbasic  
       Jul 7, 2019 via Android
    因为你和 618 只差一个 HTTP 200 ……
    lonelinsky
        3
    lonelinsky  
       Jul 8, 2019   ❤️ 1
    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
        4
    ydirel  
       Jul 8, 2019
    我是个茶壶
    limyel
        5
    limyel  
    OP
       Jul 8, 2019
    @lonelinsky 原来是这样的彩蛋.....
    december
        6
    december  
       Jul 8, 2019
    哈哈,看到 418 我就猜到是微博了。
    fank99
        7
    fank99  
       Jul 8, 2019
    之前爬其他网站也遇到过 418。。触发反爬了
    dai123456
        8
    dai123456  
       Jul 8, 2019
    发爬了,你的 ip 使用的是太多了吗?一种是使用代理,一种是编写个发爬的程序
    limyel
        9
    limyel  
    OP
       Jul 8, 2019 via iPhone
    @december 对啊,最近想爬蔡徐坤的粉丝来着😂
    limyel
        10
    limyel  
    OP
       Jul 8, 2019 via iPhone
    @december 对啊,最近想爬 cxk 的粉丝来着😂
    limyel
        11
    limyel  
    OP
       Jul 8, 2019
    @dai123456 没错,IP 的问题..我今天试试代理
    dai123456
        12
    dai123456  
       Jul 8, 2019
    专业爬虫代理,我可以帮你推荐一下
    dai123456
        13
    dai123456  
       Jul 17, 2019
    @limyel 专业爬虫代理,我可以帮你推荐一下
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1310 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 17:03 · PVG 01:03 · LAX 10:03 · JFK 13:03
    ♥ Do have faith in what you're doing.