eg:http://hgdownload.soe.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeAwgDnaseUniform/

下载该路径下的所有文件

wget http://hgdownload.soe.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeAwgDnaseUniform/

得到一个 index.html 文件

然后

wget -i index.html -F -B http://hgdownload.soe.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeAwgDnaseUniform/

-i file

--input-file=file

Read URLs from a local or external file.  If - is specified as file, URLs are read from the standard input.  (Use ./- to read from a file literally named -.)

从文件 index.html 中导入链接,默认按行读取URL

-F 

--force-html

When input is read from a file, force it to be treated as an HTML file. This enables you to retrieve relative links from existing HTML files on your local disk, by adding "" to HTML, or using the --base command-line option.

将文件以HTML格式解析,(其实就是解析<a>?)<a> 代表链接

-B URL

--base=URL

Resolves relative links using URL as the point of reference, when reading links from an HTML file specified via the -i/--input-file option (together with --force-html, or when the input file was fetched remotely from a server describing it as HTML). This is equivalent to the presence of a "BASE" tag in the HTML input file, with URL as the value for the "href" attribute.

因为发现解析出来的链接用的都是相对路径,而为了下载这个文件,必须在相对路径前添加上Base URL,-B就是用来添加Base URL。

DEMO下载地址:https://dwz.cn/Jw3z6fVq

wget批量下载http文件的更多相关文章

  1. wget 批量下载目录文件

    wget -r -p -k -np http://源目录     ./本地目标目录

  2. 通过wget工具下载指定文件中的URLs对应的资源并保存到指定的本地目录中去并进行文件完整性与可靠性校验

    创建URLs文件在终端输入cd target_directory回车,便把当前文件夹切换到了目标文件夹target_directory,此后创建的文件都会丢它里面在终端输入cat > URLs回 ...

  3. Python3 根据m3u8下载视频,批量下载ts文件并且合并

    Python3 根据m3u8下载视频,批量下载ts文件并且合并 m3u8是苹果公司推出一种视频播放标准,是一种文件检索格式,将视频切割成一小段一小段的ts格式的视频文件,然后存在服务器中(现在为了减少 ...

  4. Aras Innovator客户端批量下载关联文件

    <button onclick="btnDownload();" id="downfilebtn">批量下载关联文件</button> ...

  5. 【数据下载】利用wget命令批量下载ftp文件和文件夹

    这是一个“”数据大发现”的时代,大家都在创造数据,使用数据以及分享数据,首先一步我们就需要从数据库download我们需要的数据. Ftp是一种常见的在线数据库,今天介绍一种可以批量下载文件夹的方法, ...

  6. 利用wget批量下载http目录下文件

    原理:下载你需要down的目录页面的index.html,可能名字不是如此!!!之后用wget下载该文件里包含的所有链接! 例如:wget -vE -rLnp -nH --tries=20 --tim ...

  7. Linux wget 批量下载

    需求:已知50个pdf的URL地址,需要批量下载,该怎么办呢? 方案一:使用wget自带的一个功能 -i 选项  从指定文件中读取下载地址,这样的好处是一直是这一个wget进程下载所有pdf,不会来回 ...

  8. 047_批量下载有序文件(pdf、图片、视频等等)

    #!/bin/bash#本脚本准备有序的网络资料进行批量下载操作(如 01.jpg,02.jpg,03.jpg)#设置资源来源的域名连接 url="http://www.test.com/& ...

  9. Java实现批量下载选中文件功能

    1.在action中定义变量 ? 1 2 3 4 5 6 private List<String> downLoadPaths = new ArrayList<String>( ...

随机推荐

  1. 两个App之间的跳转 并传值

    两个App之间的传值最主要的是方法是 Intent intent = getPackageManager().getLaunchIntentForPackage("com.example.a ...

  2. Swift 小技巧 || 老偏方

    自己平时用的时候,或者看别人有一些好用的技巧分享一下,希望大家能get到 1.关于颜色 2.关于标记 // TODO:这样的标记XCode8才有的 // FIXME:这个也是XCode8有的

  3. centos实现两种秒级任务的简单方法

    1.通过写shell脚本,死循环,守护进程运行 > vi /data/sec.sh #!/bin/bash while true do #写上自已的命令 echo "hello wor ...

  4. hangfire enqueued but not processing(hangfire 定时任务入队列但不执行)

    不生效的方法 //RecurringJob.AddOrUpdate<FamilyAppService>((s) => s.UpdateFamilyLevel(), input.Cro ...

  5. jquery的validate表单验证

    html: <form id="reg" action="123.html"> <p class="myerror"> ...

  6. Vue 数组 字典 template v-for 的使用

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  7. python 网络下载的三种风格 未完成

    import osimport timeimport sys import requests#依序下载POP20_CC = ('CN IN US ID BR PK NG BD RU JP' 'MX P ...

  8. Jmeter常用脚本开发之Java请求

    Java请求:就是用来对java项目的类进行压测 例子:将输入的两个参数通过IO存入文件 1.创建Java工程,工程目录如下 2.将Jmeter-lib下面的所有jar包导入java工程, 3.创建一 ...

  9. CSS学习总结1:CSS样式

    1.CSS背景 属性 background-color:为元素设置背景色,值可以是任何合法的颜色值.实例:p {background-color: gray;} background-image:为元 ...

  10. PAT 甲级1001 A+B Format (20)(C++ -思路)

    1001 A+B Format (20)(20 分) Calculate a + b and output the sum in standard format -- that is, the dig ...