bugGNU Wget - Bugs: bug #24475, wget -A has no way to escape...

 
 

bug #24475: wget -A has no way to escape commas' in patterns

Submitted by:  None
Submitted on:  Tue 07 Oct 2008 10:41:45 AM UTC  
 
Category: User InterfaceSeverity: 3 - Normal
Priority: 4Status: Wont Fix
Privacy: PublicAssigned to: None
Originator Name: Simon GatesOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 1.11.3
Operating System: Microsoft WindowsReproducibility: Every Time
Fixed Release: NonePlanned Release: 1.14
Regression: NoneWork Required: 0 - Hours
Patch Included: No

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 02 Oct 2009 07:58:36 PM UTC, comment #1:

Now that we're going to provide regex support, there's no need to address this, really.

Micah Cowan <micahcowan>
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.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by micahcowan (Updated the item)
  • -unavailable- added by None (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 02 Oct 2009 07:58:36 PM UTCmicahcowanOpen/ClosedOpen=>Closed
    Fri 02 Oct 2009 07:58:35 PM UTCmicahcowanStatusConfirmed=>Wont Fix
    Tue 07 Oct 2008 07:36:51 PM UTCmicahcowanPriority5 - Normal=>4
      StatusNone=>Confirmed
      Planned ReleaseNone=>1.14
      Work RequiredNone=>0 - Hours

    Back to the top


    Powered by Savane 3.1-cleanup1