juiceeeeel
V2EX  ›  HTML

新人如何抓取某个 url 后的所有.jpg 链接?

  •  
  •   juiceeeeel · Aug 29, 2016 · 3367 views
    This topic created in 3587 days ago, the information mentioned may be changed or developed.

    比如 链接是 http://www.example.com/0000CN.jpg 其中就四位数字 为 0000-9999 初次接触爬虫,请问有什么办法能够快捷地获取吗

    4 replies    2016-08-29 14:10:45 +08:00
    designer
        1
    designer  
       Aug 29, 2016
    如果是下载,用迅雷批量下载设置规则。
    --来自非程序员的回答
    UnisandK
        2
    UnisandK  
       Aug 29, 2016
    for i in {10000..19999}
    do
    wget http://www.example.com/${i:1}CN.jpg
    done
    juiceeeeel
        3
    juiceeeeel  
    OP
       Aug 29, 2016
    非常感谢
    yangg
        4
    yangg  
       Aug 29, 2016
    curl -O http://www.example.com/[0001-9999]CN.jpg
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5275 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 07:18 · PVG 15:18 · LAX 00:18 · JFK 03:18
    ♥ Do have faith in what you're doing.