Using wildcards in wget or curl query

前端 未结 3 1581
庸人自扰
庸人自扰 2020-12-02 13:34

Is it possible to use wildcards in wget queries when downloading from directories? Basically, I have a site, say, www.download.example.com/dir/version/package.rpm

3条回答
  •  眼角桃花
    2020-12-02 14:10

    Although the above solution kind of works, it fails when you just want to download certain directories, but not all. For example if you have:

    http://site.io/like/
    http://site.io/like2/
    http://site.io/nolike/
    

    Instead put the directory names you want in a text file, e.g.: dirs.txt:

    like/
    like2/
    

    Then use wget with the following command options -i dirs.txt -B like so:

    wget -nH -nc -np -r -e robots=off -R "index.html*" -i dirs.txt -B http://site.io/
    

    Since, I don't think you can use directories in the -A and -R lists. (?)

提交回复
热议问题