Re: : Re: Trying to download a filled in webpage
Date: Thu, 05 Mar 2009 17:14:03 +0100
Zitat von Robert Baker <rbaker_at_bakersoftwaretechnologies.com>:
> Hi all,
> I am really close to getting what I need from the web page( This is
> in windows and from a dos box)
> If I run the command pasted into a Dos box, I get the results that I
> need, But If I run it from a .bat file,
> I do not get the results.
> Here is the command that I am using.:
> curl -Lo mee -c cookies.txt -b cookies.txt --dump-header headers.txt
> -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199)
> Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)"
> "http://local.live.com/default.aspx?v=2&rtp=adr.6200%20South%20Main%20Street,Ashtabula,Ohio,~adr.4338%20Lake%20Road%20West,Ashtabula,Ohio~adr.2300%20West%2019%20street,Ashtabula,Ohio" -H
> If you cut and paste this in a dos Box, you will get the correct results
> If you run this from a .bat file. you will not get the correct results.
> To see the difference all you need to do is load the "mee" file in
> an editor and look for the string "Trip:"(without quotes). The
> command run pasted into the Dos Box will show on the next line:
> class="distance">20.0 km
> If you run it from a .bat file. the next line will show
> class="distance">0.0 km
> Why the difference?
> any help at all would be appreciated.
That happens, because the %-Character has special meaning in
DOS/Windows Batch-Files, it is used for parameter and variable
substitutions, even inside quoted strings. You must double (%%) each
occurence to get it through to the program.
University of Cologne
Robert-Koch-Str. 10 Tel.: +49-221/478-7024
D-50931 Koeln E-Mail: Roderburg_at_Uni-Koeln.DE
PS: Why are you quoting tons of unrelated curl-digest stuff in your mail ????
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
Received on 2009-03-05