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>( ...
随机推荐
- Navicat连接MySQL,出现2059 - authentication plugin 'caching_sha2_password'的解决方案
昨天当我把MySQL的安装程序下载并安装好,然后又下载了另外一个工具来使用它,该工具的名称是Navicat Premium,当我通过该工具连接MySQL Workbench的时候,无法连接,提示“20 ...
- .net 技术地图
以下是技术牛人,灵感之源.在于15年7月23日归类的一个技术地图 主要包括10个大类.50个子类 http://jingyan.baidu.com/article/4ae03de344f9b33eff ...
- list集合与HashMap的使用
List<Map<String, Object>> arrays= new ArrayList<Map<String, Object>>(); Hash ...
- visual studio 2017 30天到期,不能输入注册码
官网下载了visual studio 2017后,第一次安装没有登陆,导致只有30天试用期,虽然还在试用期内,但是无法使用注册码永久使用 解决办法: 1.注册一个微软账号,直接百度搜索“微软账号登陆” ...
- (转)关于 HTTP meta 的 IE=edge 说明
关于 HTTP meta 的 IE=edge 说明 陌生标记标记一: < meta http-equiv = "X-UA-Compatible" content = &quo ...
- 小明A+B
/* 小明今年3岁了, 现在他已经能够认识100以内的非负整数, 并且能够进行100以内的非负整数的加法计算. 对于大于等于100的整数, 小明仅保留该数的最后两位进行计算, 如果计算结果大于等于10 ...
- Android.PackageManager
1. Apk的安装和更新过程是怎样的呢? Ref[1] 2. 在安装.apk程序包时, .so是如何选择并安装的? 这里的选择是指,是如何根据CPU_ABI和CPU_ABI2的值来选择合适的.so的. ...
- There are stopped jobs
问题背景 系统:ubuntu,当输入exit退出shell时,出现There are stopped jobs 无法退出shell 解决办法 找到这个stopped job然后终止它 jobs 或者 ...
- MySQL 检索数据及提高检索速度的方法
检索数据 mysql> SELECT [DISTINCT] 表名.列名,表名.列名,表名.列名 -- 使用通配符*表示所有列 DISTINCT表示返回不同的值 -> FROM 数据库名.表 ...
- [Robot Framework] 校验字符串中是否包含某个子字符串,校验同时满足两个条件中任意一个
${tWarningMessage} Run Keyword If ${tIfExist} AutoItLibrary.Win Get Text Generate Fee Data warning m ...