V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Dive into HTML5
http://diveintohtml5.org/
juiceeeeel
V2EX  ›  HTML

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

  •  
  •   juiceeeeel · 2016-08-29 13:41:47 +08:00 · 2604 次点击
    这是一个创建于 2790 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    4 条回复    2016-08-29 14:10:45 +08:00
    designer
        1
    designer  
       2016-08-29 13:44:44 +08:00
    如果是下载,用迅雷批量下载设置规则。
    --来自非程序员的回答
    UnisandK
        2
    UnisandK  
       2016-08-29 13:53:26 +08:00
    for i in {10000..19999}
    do
    wget http://www.example.com/${i:1}CN.jpg
    done
    juiceeeeel
        3
    juiceeeeel  
    OP
       2016-08-29 14:06:16 +08:00
    非常感谢
    yangg
        4
    yangg  
       2016-08-29 14:10:45 +08:00
    curl -O http://www.example.com/[0001-9999]CN.jpg
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1013 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 22:55 · PVG 06:55 · LAX 15:55 · JFK 18:55
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.