V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
gavinzgz
V2EX  ›  问与答

爬虫301是什么情况?

  •  
  •   gavinzgz · 2014-01-15 14:15:47 +08:00 · 3291 次点击
    这是一个创建于 3757 天前的主题,其中的信息可能已经有所发展或是发生改变。
    小爬了几次,爬不动了,curl指令返回:
    <html>
    <head><title>301 Moved Permanently</title></head>
    <body bgcolor="white">
    <center><h1>301 Moved Permanently</h1></center>
    <hr><center>nginx</center>
    </body>
    </html>
    真狠,连浏览器也上不去了,这可咋整?
    5 条回复    1970-01-01 08:00:00 +08:00
    binux
        1
    binux  
       2014-01-15 14:36:40 +08:00
    -L, --location Follow redirects (H)
    gavinzgz
        2
    gavinzgz  
    OP
       2014-01-15 14:38:55 +08:00
    @binux http301好像不会造成浏览器上不去,应该是一种防爬虫策略的伪装。
    binux
        3
    binux  
       2014-01-15 15:00:28 +08:00
    @gavinzgz 因为浏览器行为是跳转
    vibbow
        4
    vibbow  
       2014-01-15 18:11:48 +08:00
    你是不是爬到了
    http://example.com 之类的
    因为这样会跳转到
    http://example.com/
    txlty
        5
    txlty  
       2014-01-15 21:09:51 +08:00
    你需要的信息在header里,不在正文里。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5332 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 09:25 · PVG 17:25 · LAX 02:25 · JFK 05:25
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.