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

爬虫301是什么情况?

  •  
  •   gavinzgz · 2014 年 1 月 15 日 · 3888 次点击
    这是一个创建于 4384 天前的主题,其中的信息可能已经有所发展或是发生改变。
    小爬了几次,爬不动了,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 年 1 月 15 日
    -L, --location Follow redirects (H)
    gavinzgz
        2
    gavinzgz  
    OP
       2014 年 1 月 15 日
    @binux http301好像不会造成浏览器上不去,应该是一种防爬虫策略的伪装。
    binux
        3
    binux  
       2014 年 1 月 15 日
    @gavinzgz 因为浏览器行为是跳转
    vibbow
        4
    vibbow  
       2014 年 1 月 15 日
    你是不是爬到了
    http://example.com 之类的
    因为这样会跳转到
    http://example.com/
    txlty
        5
    txlty  
       2014 年 1 月 15 日
    你需要的信息在header里,不在正文里。
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2793 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:15 · PVG 12:15 · LAX 20:15 · JFK 23:15
    ♥ Do have faith in what you're doing.