Tue 07 Oct 2008 10:41:45 AM UTC, original submission:
(Cygwin)
The -A option takes a comma separated list of patterns/suffixes to match urls to download. However if your pattern contains a comma, it will be treated as two separate patterns.
For example, trying to recursively get a section of a website using:
wget -r -np -k -A "abc*(abc,def).html"
intending to get pages named like:
http://mysite.com/abc123456(abc,def).html
As expected, this results in all pages ending "def).html" being downloaded as the comma is the pattern separator. However, there is no way to escape the comma in the URL to reject pages like:
http://mysite.com/XXX(def).html
Replacing with '*', '?', '\,', or '%2C' results in the original page being removed after download "since it should be rejected."
To test:
wget -e robots=off -np -r -k -A '/bb*(VS.80?printer).aspx' 'http://msdn.microsoft.com/en-us/library/bb166441(VS.80,printer).aspx'
results in the output:
--2008-10-07 11:40:04-- http://msdn.microsoft.com/en-us/library/bb166441(VS.80,printer).aspx
Resolving msdn.microsoft.com... 207.46.199.251
Connecting to msdn.microsoft.com|207.46.199.251|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10149 (9.9K) [text/html]
Saving to: `msdn.microsoft.com/en-us/library/bb166441(VS.80,printer).aspx'
100%[==========================================================>] 10,149 62.7K/s in 0.2s
2008-10-07 11:40:05 (62.7 KB/s) - `msdn.microsoft.com/en-us/library/bb166441(VS.80,printer).aspx' sa
ved [10149/10149]
Removing msdn.microsoft.com/en-us/library/bb166441(VS.80,printer).aspx since it should be rejected.
FINISHED --2008-10-07 11:40:05--
Downloaded: 1 files, 9.9K in 0.2s (62.7 KB/s)
Converted 0 files in 0 seconds.
|