ftp - 仅使用 wget 下载文本文件
问题描述
使用wget
是否可以为特定文件类型蜘蛛主机?我正在从 FTP 归档一些文档,我需要让它抓取整个主机只下载.txt
文件。
我试过这样:
wget mysite.com/ftplist --config=./.wgetrc
具有以下内容.wgetrc
:
accept = txt
check_certificate = off
connect_timeout = 3
cookies = off
dns_cache = off
follow_ftp = on
logfile = amz.log
max_redirect = 3
no_clobber = on
recursive = on
save_headers = on
这将调用mysite.com/ftplist
. 此页面包含ftp://
列表中的 URL。wget
向此页面发出请求,但不会继续进行,并且似乎停止在该页面上。
这里是amz.log
Saving to: ‘mysite.com/ftplinks/index.html.tmp’
0K .......... .......... .......... .......... .......... 656K
50K .......... .......... .......... .......... .......... 741K
100K .......... .......... .......... .......... .......... 1.12M
150K .......... .......... .......... .......... .......... 975K
200K .......... .......... .......... .......... .......... 935K
250K .......... .......... .......... .......... .......... 835K
300K .......... .......... .......... .......... .......... 870K
350K .......... .......... .......... .......... .......... 1.07M
400K .......... .......... .......... ....... 907K=0.5s
2018-12-20 17:55:54 (881 KB/s) - ‘mysite.com/ftplinks/index.html.tmp’ saved [447555]
Removing mysite.com/ftplinks/index.html.tmp since it should be rejected.
我错过了什么吗?
解决方案
推荐阅读
- r - 查询某个元素在列表中的比例
- html - 如何使用 HTML/CSS 添加边框线
- css - 来自另一个不可见 SVG 的 SVG 过滤器完全移除目标
- javascript - 带有 ID 的 React Datatable 组件中的编辑按钮
- google-play - Google Play 中的 gsutil 工具提取数据的数据类型是什么
- angular - Angular 无法读取未定义错误的属性“GetCarList”
- python - 比较未对齐的系列列 Pandas
- python - 设计 django Relation 以便以后轻松保存数据
- reactjs - React Typescript:将字符串数组呈现为无序列表
- python-3.x - BeautifulSoup 无法读取 wiki 页面