V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
wisatbff
V2EX  ›  Linux

wget 如何自动获取文件名?

  •  
  •   wisatbff · Aug 28, 2014 · 5799 views
    This topic created in 4272 days ago, the information mentioned may be changed or developed.
    比如说这个链接 https://class.coursera.org/nlangp-001/lecture/subtitles?q=125_en&format=srt ,在浏览器里直接点击可以出文件名,用 wget 怎么办到?
    5 replies    2014-08-28 15:14:32 +08:00
    wisatbff
        1
    wisatbff  
    OP
       Aug 28, 2014
    用 --content-disposition 选项结果文件名乱码(文件名不含非 ASCII 码)
    hcymk2
        2
    hcymk2  
       Aug 28, 2014
    不是乱码吧 文件名要urldecode下.
    wisatbff
        3
    wisatbff  
    OP
       Aug 28, 2014
    @hcymk2 好吧。wget 好像不能完美的完成任务,找到了一个别人用 python 写的下载器
    https://github.com/coursera-dl/coursera
    livelazily
        4
    livelazily  
       Aug 28, 2014
    用 aria2c 下载可以获取正确的文件名
    wisatbff
        5
    wisatbff  
    OP
       Aug 28, 2014
    @livelazily 赞。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   909 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 21:30 · PVG 05:30 · LAX 14:30 · JFK 17:30
    ♥ Do have faith in what you're doing.