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

命令行抓取当天的新民晚报

  •  
  •   Guanjun · 2011-06-17 19:26:58 +08:00 · 3898 次点击
    这是一个创建于 4690 天前的主题,其中的信息可能已经有所发展或是发生改变。
    说明
    1. 由于中间文件比较多,需要cd到一个空目录再执行下面的命令。
    2. pdftk需要自行安装。

    $ curl 'http://pdf.news365.com.cn/xmpdf/default.asp' | egrep -o '[0-9]+/XM[A-Z0-9]+.pdf' | sed 's!^\(.*\)$!http://pdf.news365.com.cn/xmpdf/\1!' | xargs curl --remote-name-all

    $ pdftk * cat output XM.pdf
    1 条回复    1970-01-01 08:00:00 +08:00
    dexter
        1
    dexter  
       2011-06-17 22:05:43 +08:00
    命令行的生活要大力推广
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2274 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 00:56 · PVG 08:56 · LAX 17:56 · JFK 20:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.