V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
wisatbff
V2EX  ›  Linux

wget 如何自动获取文件名?

  •  
  •   wisatbff · 2014-08-28 09:41:11 +08:00 · 4939 次点击
    这是一个创建于 3521 天前的主题,其中的信息可能已经有所发展或是发生改变。
    比如说这个链接 https://class.coursera.org/nlangp-001/lecture/subtitles?q=125_en&format=srt ,在浏览器里直接点击可以出文件名,用 wget 怎么办到?
    5 条回复    2014-08-28 15:14:32 +08:00
    wisatbff
        1
    wisatbff  
    OP
       2014-08-28 09:50:11 +08:00
    用 --content-disposition 选项结果文件名乱码(文件名不含非 ASCII 码)
    hcymk2
        2
    hcymk2  
       2014-08-28 10:03:15 +08:00
    不是乱码吧 文件名要urldecode下.
    wisatbff
        3
    wisatbff  
    OP
       2014-08-28 10:31:10 +08:00
    @hcymk2 好吧。wget 好像不能完美的完成任务,找到了一个别人用 python 写的下载器
    https://github.com/coursera-dl/coursera
    livelazily
        4
    livelazily  
       2014-08-28 12:50:43 +08:00
    用 aria2c 下载可以获取正确的文件名
    wisatbff
        5
    wisatbff  
    OP
       2014-08-28 15:14:32 +08:00
    @livelazily 赞。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1418 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 23:54 · PVG 07:54 · LAX 16:54 · JFK 19:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.