<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Wget on Planet Hawleywood</title><link>https://blog.planethawleywood.com/tags/wget/</link><description>Recent content in Wget on Planet Hawleywood</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 07 Feb 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.planethawleywood.com/tags/wget/index.xml" rel="self" type="application/rss+xml"/><item><title>Fun with wget</title><link>https://blog.planethawleywood.com/posts/fun-with-wget/</link><pubDate>Mon, 07 Feb 2022 00:00:00 +0000</pubDate><guid>https://blog.planethawleywood.com/posts/fun-with-wget/</guid><description>&lt;h2 id="wget-multiple-files"&gt;wget multiple files&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;wget -r -l1 -A.mp3 http://aaa.com/directory
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In the above example, -r and -l1 options together enable 1-level deep recursive retrieval, and &lt;code&gt;-A&lt;/code&gt; option specifies lists of file name suffixes to accept during recursive download (.mp3 in this case).&lt;/p&gt;
&lt;h2 id="ways-to-wget-entire-webpage"&gt;ways to wget entire webpage&lt;/h2&gt;
&lt;p&gt;This one works so well, I&amp;rsquo;ve created an alias for it:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;wgetMirror=&amp;#39;/usr/bin/wget -o wget.log -mkEpnp –wait=9 –user-agent=&amp;#39;\&amp;#39;&amp;#39;Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)&amp;#39;\&amp;#39;&amp;#39; –no-check-certificate&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Other options:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains example.com --no-parent &amp;lt;url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="modify-user-agent"&gt;Modify User Agent&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ wget -U &amp;#34;Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)&amp;#34; &amp;lt;url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="wget-from-webdav-with-authentication"&gt;wget from webdav with authentication&lt;/h2&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;wget --http-user=user-id --http-password=password &amp;lt;URL&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="reference"&gt;Reference&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://xmodulo.com/how-to-download-multiple-files-with-wget.html"&gt;Download Multiple Files with wget&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.petekeen.net/archiving-websites-with-wget"&gt;Archiving website with wget&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://janezurevc.name/download-entire-web-page-using-wget"&gt;Download entire webpage with wget&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.networkinghowtos.com/howto/change-the-user-agent-in-wget/"&gt;Change the User Agent in wget&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>