例如:
wget -m https://www.kali.org
没有警告,没有错误;什么可能是错的?
更复杂的是,我使用了推荐的命令(参见下面的命令),输出并不令人满意(目前为止):
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --domains=kali.org www.kali.org
Both --no-clobber and --convert-links were specified, only --convert-links will be used.
URL transformed to HTTPS due to an HSTS policy
--2019-07-04 14:13:38-- https://www.kali.org/
Resolving www.kali.org (www.kali.org)... 192.124.249.10
Connecting to www.kali.org (www.kali.org)|192.124.249.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18714 (18K) [text/html]
Saving to: ‘www.kali.org/index.html.gz’
www.kali.org/index.html.gz 100%[=======================================================>] 18.28K --.-KB/s in 0.01s
2019-07-04 14:13:38 (1.84 MB/s) - ‘www.kali.org/index.html.gz’ saved [18714/18714]
FINISHED --2019-07-04 14:13:38--
Total wall clock time: 0.3s
Downloaded: 1 files, 18K in 0.01s (1.84 MB/s)
Converting links in www.kali.org/index.html.gz... nothing to do.
Converted links in 1 files in 0 seconds.
但是..。镜像https://www.cnn.com -例如
Ubuntu19.04 代号: disco
有些页面作为“查看页面源”加载:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0" />
<link href='./index.css' rel='stylesheet' type='text/css'>
<title>crontab.guru - the cron schedule expression editor</title>
<meta name="description" content="An easy to use editor for crontab schedules.">
<meta name="google-site-verification" content="QPa8OWuMuIsXgvuvPdfSCxA4ewd2Gs5tTUh0k2crBPE" />
</head>
<body>
<a href="/"><h1>crontab guru</h1></a>
<div class="blurb">
<div>The quick and simple editor for cron schedule expressions by <a href="https://cronitor.io?utm_source=crontabguru&utm_campaign=cronitor_top" title="Cron job monitoring and observability" rel="nofollow">Cronitor</a></div>
</div>
<div id="content">loading...</div>
树目录也没有下载。
Check after 4 years and now works fine.
发布于 2019-07-03 13:21:01
这是可行的,它将复制当地的网站。
如果这是您想要的,请使用如下命令(将domain.com
更改为您想要的域):
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --domains=domain.com domain.com
--recursive
的意思是:下载整个网站。--no-clobber
的意思是:不要覆盖现有文件。--page-requisites
的意思是:下载页面的所有组件,包括图像。--html-extension
的意思是:将页面保存为.html文件。--convert-links
的意思是:将所有链接转换为本地运行。离线。--domains=domain.com
的意思是:不要遵循此域之外的链接。有些web服务器对服务页面使用压缩,wget
将下载压缩文件index.html.gz
,如下所示:
2019-07-04 14:13:38 (1.84 MB/s) -‘domain.com/index.html.gz’保存的18714/18714
在这种情况下,wget
需要一个额外的选项--compression=auto
或--compression=gzip
来在本地正确处理和解压缩页面。您可以这样使用这个选项的命令(将domain.com
更改为您想要的域):
wget --compression=auto --recursive --no-clobber --page-requisites --html-extension --convert-links --domains=domain.com domain.com
欲进一步阅读,请参阅Wget -非交互式网络下载器
发布于 2020-04-11 12:50:31
我也有同样的问题。
尝试以下命令:
wget --wait 1 -x -H -mk http://site.to.mirror/
https://askubuntu.com/questions/1155764
复制相似问题