Windows下安装wget工具

一、下载:

官网:http://gnuwin32.sourceforge.net/packages/wget.htm

在这里插入图片描述

下载地址:http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-setup.exe

二、安装与系统环境变量配置

2.1 安装 双击一步步安装即可

2.2 配置系统环境变量

新建变量GNU_HOMEC:\Program Files (x86)\GnuWin32

Path变量中添加: ;%GNU_HOME%\bin

2.3 重启cmd

C:\Users\xxx>wget
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
wget:未指定 URL
用法: wget [选项]... [URL]...

请尝试使用“wget --help”查看更多的选项。

C:\Users\xxx>

参考:

Windows下安装wget https://www.cnblogs.com/dandeliongogo/p/6694671.html

Windows环境下使用强大的wget工具 https://www.cnblogs.com/hzdx/p/6432161.html

 

出处:https://blog.csdn.net/jiduochou963/article/details/88698757

=======================================================================================

如何在Windows下载和安装Wget

windows安装wget

wget is used download files over network with different protocols. wget can be get from most of the linux distributions with their respective package manager. But in windows we need to get and install wget manually. In this tutorial we will look how to download, install and setup wget for windows operating systems like 7, 8, 10, server etc. For more information of wget windows usage look following tutorial.

wget用于通过具有不同协议的网络下载文件。 wget可以从大多数Linux发行版及其相应的包管理器中获取。 但是在Windows中,我们需要手动获取和安装wget 。 在本教程中,我们将研究如何为Windows操作系统(如wget ,服务器等)下载,安装和设置wget 。有关wget Windows使用的更多信息,请参见以下教程。

http://www.poftut.com/wget-command-tutorial-examples-linux/

http://www.poftut.com/wget-command-tutorial-examples-linux/

从Sourceforge下载 (Download From Sourceforge)

Sourceforge provide support for a lot of opensource and free projects. wget is one of them. We can download windows binaries from following links.

Sourceforge为许多开源和免费项目提供支持。 wget是其中之一。 我们可以从以下链接下载Windows二进制文件。

二进制文件 (Binaries)

http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-bin.zip

http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-bin.zip

源文件 (Source Files)

http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-src-setup.exe

http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-src-setup.exe

文献资料 (Documentation)

http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-doc.zip

http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-doc.zip

从Eternallybored下载 (Download From Eternallybored)

Eternallybored.org is a web site provides GNU projects windows binaries. We can download wget from following links.

Eternallybored.org是一个提供GNU项目Windows二进制文件的网站。 我们可以从以下链接下载wget

32位二进制 (32 Bit Binary)

https://eternallybored.org/misc/wget/releases/wget-1.19.1-win32.zip

https://eternallybored.org/misc/wget/releases/wget-1.19.1-win32.zip

64位二进制 (64 Bit Binary)

https://eternallybored.org/misc/wget/releases/wget-1.19.1-win64.zip

https://eternallybored.org/misc/wget/releases/wget-1.19.1-win64.zip

安装 (Installation)

Download wget.exe or similar files and extract if required.

下载wget.exe或类似文件并根据需要解压缩。

Then create a folder named wget in the program files.

然后在程序文件中创建一个名为wget的文件夹。

> mkdir wget

复制档案 (Copy Files)

We will copy file or files to the newly created folder named wget . The full path of wget is C:\Program Files\wget .

我们会将一个或多个文件复制到名为wget的新创建的文件夹中。 wget的完整路径是C:\Program Files\wget

> copy "c:\Users\ismail\Downloads\wget64.exe" "c:\Program Files\wget\"

将Wget路径添加到环境变量 (Add Wget Path To Environment Variables)

Now we will add the current path of wget binary to the system path.

现在,我们将wget binary的当前路径添加到系统路径。

Computer -> Advenced System Settings -> Advenced -> Environment Variables -> Path  System variable.

Computer -> Advenced System Settings -> Advenced -> Environment Variables -> Path系统变量。

Add the following line. This will add wget path to the PATH variable which is used to locate commands and binaries. So we can use wget from different directories and drives without providing the whole wget binary path.

添加以下行。 这会将wget路径添加到PATH变量中,该变量用于定位命令和二进制文件。 因此,我们可以使用不同目录和驱动器中的wget ,而无需提供完整的wget二进制路径。

;C:\Program Files\wget

运行Wget Windows (Run Wget Windows)

Now open new MS-DOS or Powershell terminal to run wget command.

现在打开新的MS-DOS或Powershell终端以运行wget命令。

>wget64.exe --help
Run Wget Windows Run Wget Windows 运行Wget Windows
 
LEARN MORE  How To Ping Specified Port Number?
 
了解更多信息如何Ping指定的端口号?

翻译自: https://www.poftut.com/download-install-wget-windows/

windows安装wget

 

出处:https://blog.csdn.net/cunjiu9486/article/details/109075354

=======================================================================================

win下安装wget以及使用wget

1、 安装wget
网址:http://gnuwin32.sourceforge.net/packages/wget.htm
下载http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-setup.exe
双击安装
2、系统环境变量,新建
GNU_HOME=D:\Program Files (x86)\GnuWin32
3、path添加
==========分割线==============
;%GNU_HOME%\bin
==========分割线==============
4、下载整站:
用wget下载东西,的确很方便,它会自动重连并断点续传。让人很放心。
经常要下载一个网站或网站的某个目录。
下载一个目录,例如下载网站www.example.com/目录mydir下的所有内容
命令如下:
wget -r -p -k -np -nc -e robots=off http://www.example.com/mydir/

如果要想下载整个网站,最好去除-np参数。
wget -r -p -k -nc -e robots=off http://www.example.com/mydir/

-r 递归;对于HTTP主机,wget首先下载URL指定的文件,然后(如果该文件是一个HTML文档的话)递归下载该文件所引用(超级连接)的所有文件(递 归深度由参数-l指定)。对FTP主机,该参数意味着要下载URL指定的目录中的所有文件,递归方法与HTTP主机类似。
-c 指定断点续传功能。实际上,wget默认具有断点续传功能,只有当你使用别的ftp工具下载了某一文件的一部分,并希望wget接着完成此工作的时候,才 需要指定此参数。
-nc 不下载已经存在的文件
-np 表示不追溯至父目录,不跟随链接,只下载指定目录及子目录里的东西;
-p 下载页面显示所需的所有文件。比如页面中包含了图片,但是图片并不在/yourdir目录中,而在/images目录下,有此参数,图片依然会被正常下 载。
-k 修复下载文件中的绝对连接为相对连接,这样方便本地阅读。
-o down.log 记录日记到down.log
-e robots=off 忽略robots.txt


例子:
wget -r -p -np -k http://www.52dachu.com/
wget -T 5 -t 10 -Q 500m -nH -r -E -l inf -k -p -np 'http://www.w3school.com.cn/'

 

出处:https://www.cnblogs.com/yhdsir/p/5729261.html

posted on 2021-06-22 10:37  jack_Meng  阅读(2528)  评论(0编辑  收藏  举报

导航