Call but not download a page with wget

7

1

I was wondering if there was any argument that allowed me to use wget and "call" a page, but without downloading the page.

The problem is that when you call wget on a page, it downloads it to the folder wget.exe resides in, but I don't want to download a file every time I use it.

Andreas Grech

Posted 2009-07-21T08:03:12.917

Reputation: 3 522

Answers

9

Use the --spider option.

--spider

When invoked with this option, Wget will behave as a Web spider,
which means that it will not download the pages, just check that
they are there. You can use it to check your bookmarks, e.g. with:

            wget --spider --force-html -i bookmarks.html

John T

Posted 2009-07-21T08:03:12.917

Reputation: 149 037

2Beware that --spider may perform a HEAD request instead of a GET request, which means the URL may react differently. – bzlm – 2009-10-10T10:22:47.840

1Excellent, exactly what I was looking for – Andreas Grech – 2009-07-21T08:07:42.640

1

GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP. If you are not actually interested in retrieving files, you may be better off using a tool like cURL, which may have more fine-tuned support for what you want to do. (Using the --spider switch in Wget, for example, is an experimental hack according to the documentation.)

bzlm

Posted 2009-07-21T08:03:12.917

Reputation: 111