wget批量下载http文件
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文件的更多相关文章
- wget 批量下载目录文件
wget -r -p -k -np http://源目录 ./本地目标目录
- 通过wget工具下载指定文件中的URLs对应的资源并保存到指定的本地目录中去并进行文件完整性与可靠性校验
创建URLs文件在终端输入cd target_directory回车,便把当前文件夹切换到了目标文件夹target_directory,此后创建的文件都会丢它里面在终端输入cat > URLs回 ...
- Python3 根据m3u8下载视频,批量下载ts文件并且合并
Python3 根据m3u8下载视频,批量下载ts文件并且合并 m3u8是苹果公司推出一种视频播放标准,是一种文件检索格式,将视频切割成一小段一小段的ts格式的视频文件,然后存在服务器中(现在为了减少 ...
- Aras Innovator客户端批量下载关联文件
<button onclick="btnDownload();" id="downfilebtn">批量下载关联文件</button> ...
- 【数据下载】利用wget命令批量下载ftp文件和文件夹
这是一个“”数据大发现”的时代,大家都在创造数据,使用数据以及分享数据,首先一步我们就需要从数据库download我们需要的数据. Ftp是一种常见的在线数据库,今天介绍一种可以批量下载文件夹的方法, ...
- 利用wget批量下载http目录下文件
原理:下载你需要down的目录页面的index.html,可能名字不是如此!!!之后用wget下载该文件里包含的所有链接! 例如:wget -vE -rLnp -nH --tries=20 --tim ...
- Linux wget 批量下载
需求:已知50个pdf的URL地址,需要批量下载,该怎么办呢? 方案一:使用wget自带的一个功能 -i 选项 从指定文件中读取下载地址,这样的好处是一直是这一个wget进程下载所有pdf,不会来回 ...
- 047_批量下载有序文件(pdf、图片、视频等等)
#!/bin/bash#本脚本准备有序的网络资料进行批量下载操作(如 01.jpg,02.jpg,03.jpg)#设置资源来源的域名连接 url="http://www.test.com/& ...
- Java实现批量下载选中文件功能
1.在action中定义变量 ? 1 2 3 4 5 6 private List<String> downLoadPaths = new ArrayList<String>( ...
随机推荐
- Android Studio 运行shell
public void RunCmd(String mycmd) { Process su = null; try { su = Runtime.getRuntime().exec("su& ...
- first H5
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- sqlserver数据库命名规则
sqlserver数据库命名规则: (1)第一个字符必须是字母或“_”.“@”.“#” (2)数据库名称不能是T-SQL的保留字 (3)不允许嵌入空格或其他特殊字符
- @__CheckForDebuggerJustMyCode@4
最近在编译一个项目MiniFSWatcher,其中有一部分程序需要安装驱动minispy,编译过程中报错 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 LNK2019 无法解析的外部符号 @ ...
- java的eclipse的使用
1下载eclipse地址:www.eclipse.org/downloads/ 解压就可安装 注意: 这可能你是没有安装java运行环境(jre或jdk) 直接www.java.com,下载就行 下一 ...
- 10.22JS日记
1.js数据类型分析 (1)基础类型:string.number.boolean.null.undefined (2)引用类型:object-->json.array... 2.点运算 xxx ...
- c#dev tabcontrol 与嵌套gridcontrol 总结
Gridcontrol设置 1: 拖进去的时候别拖到tabcontrol外边, 否则dock 停靠的时候,停靠错了地方. 2:去掉Drag a column header here to group. ...
- poj 3624 && hdu 2955(背包入门)
http://poj.org/problem?id=3624 背包中最基础的01背包,大意是有N件物品和一个容量为V的背包.第i件物品的费用是c[i],价值是w[i].求解将哪些物品装入背包可使价值总 ...
- POJ3417 Network
一道LCA+树上差分 原题链接 显然每一条新增边都会导致环. 如果试着举些例子的话,很容易发现割掉非环上的边,则割掉其他任意一条新增边都可达成目标:若割掉的原有边是一个环上的边,那么只有割掉导致这个环 ...
- 0 or 1,1 and 0
最近小编遇到很头疼的的一件事 就是以下这几道运算题 ,以下结果是小编经过大量的运算得出的 一.或运算 1.0 or 1 结果为:1 2.1 or 0 结果为:1 3.1 or 2 结果为:1 4.2 ...