gavinzgz
V2EX  ›  问与答

爬虫301是什么情况?

  •  
  •   gavinzgz · Jan 15, 2014 · 4117 views
    This topic created in 4545 days ago, the information mentioned may be changed or developed.
    小爬了几次,爬不动了,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 replies    1970-01-01 08:00:00 +08:00
    binux
        1
    binux  
       Jan 15, 2014
    -L, --location Follow redirects (H)
    gavinzgz
        2
    gavinzgz  
    OP
       Jan 15, 2014
    @binux http301好像不会造成浏览器上不去,应该是一种防爬虫策略的伪装。
    binux
        3
    binux  
       Jan 15, 2014
    @gavinzgz 因为浏览器行为是跳转
    vibbow
        4
    vibbow  
       Jan 15, 2014
    你是不是爬到了
    http://example.com 之类的
    因为这样会跳转到
    http://example.com/
    txlty
        5
    txlty  
       Jan 15, 2014
    你需要的信息在header里,不在正文里。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1101 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 18:09 · PVG 02:09 · LAX 11:09 · JFK 14:09
    ♥ Do have faith in what you're doing.