juiceeeeel
V2EX  ›  HTML

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

  •  
  •   juiceeeeel · Aug 29, 2016 · 3591 views
    This topic created in 3730 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
    designer
    Aug 29, 2016
    1
    如果是下载,用迅雷批量下载设置规则。
    --来自非程序员的回答
    UnisandK
    UnisandK
    Aug 29, 2016
    2
    for i in {10000..19999}
    do
    wget http://www.example.com/${i:1}CN.jpg
    done
    juiceeeeel
    juiceeeeel
    OP
    Aug 29, 2016
    3
    非常感谢
    yangg
    yangg
    Aug 29, 2016
    4
    curl -O http://www.example.com/[0001-9999]CN.jpg
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   989 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 18:23 · PVG 02:23 · LAX 10:23 · JFK 13:23
    ♥ Do have faith in what you're doing.