cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl in combination with parameters and redirection

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Thu, 29 Sep 2005 21:24:58 -0500

The -v and the -i options tell you things about the transfer that you
wouldn't normally see, including incoming cookies.

Ralph

On 9/29/05, Jan Jansen <janjansenbe_at_gmail.com> wrote:
>
> Hello Ralph,
>
> Great ! Your information is very usefull. Thanks !!
>
> A few more questions (to increase my knowlegde) :
>
> - how did you know that cookies would make it work ?
> - I cannot find any parameter in curl to convert the links in the document
> to make them suitable for local viewing
>
>
>
> Cheers, Jan
>
> On 9/29/05, Ralph Mitchell <ralphmitchell_at_gmail.com> wrote:
> >
> > You need to process cookies. Something like:
> >
> > curl -b cookies -c cookies -o first_page.html [first_url]
> > curl -b cookies -c cookies -o second_page.html [second_url]
> >
> > When I try that, I get back a page that contains, among other things:
> >
> > Vastgoedlijst
> > 5 vastgoedaanbiedingen
> >
> > along with 5 images and prices in Euros. Displaying second_page.html in
> > a browser gets me the same page as I get when I paste that first url into
> > the browser.
> >
> > Ralph
> >
> >
> > On 9/29/05, Jan Jansen <janjansenbe_at_gmail.com > wrote:
> > >
> > > Hi Ralph,
> > >
> > > When I try the following :
> > >
> > > curl "http://www.immoweb.be/NL/client/search.cfm?immosource=frnba&notid=92477&NotAlea=92477&Notcategorie&NotSearch=N"<http://www.immoweb.be/NL/client/search.cfm?immosource=frnba&notid=92477&NotAlea=92477&Notcategorie&NotSearch=N>
> > >
> > > and next
> > >
> > > curl -o test "http://www.immoweb.be/NL/client/results.gallery.cfm?xidcategorie=&mycurrent_section=buy&xinitliste=Y&xnotsearch=Y"<http://www.immoweb.be/NL/client/results.gallery.cfm?xidcategorie=&mycurrent_section=buy&xinitliste=Y&xnotsearch=Y>
> > >
> > > The content of test is totally different from when I just post the
> > > first url in a webbrowser (which changes the url automatically in the second
> > > url) and shows content in the browser. I am trying to fetch the source code
> > > of that content.
> > >
> > > Jan
> > >
> > > On 9/29/05, Ralph Mitchell < ralphmitchell_at_gmail.com> wrote:
> > > >
> > > > Well, one thing you're going to have to do is take a look at the
> > > > page you get back, and extract this line from it:
> > > > location.href="results.gallery.cfm
> > > > ?xidcategorie=&mycurrent_section=buy&xinitliste=Y&xnotsearch=Y"
> > > >
> > > > then fill in the fully qualified hostname and go fetch that. Another
> > > > thing you might want to consider is taking wget questions to a mailing list
> > > > that deals with wget. I believe this is the curl mailing list, though I can
> > > > see how there might be some confusion...
> > > >
> > > > Ralph Mitchell
> > > >
> > > >
> > > > On 9/29/05, Jan Jansen <janjansenbe_at_gmail.com > wrote:
> > > > >
> > > > > Hello,
> > > > >
> > > > > The basic functionality of wget is known to me and very usefull.
> > > > >
> > > > > However, currently I try to fetch a url of the following layout :
> > > > >
> > > > > http://www.immoweb.be/NL/client/search.cfm?immosource=frnba&notid=92477&NotAlea=92477&Notcategorie&NotSearch=N
> > > > >
> > > > >
> > > > > which is automatically redirected towards the following url (when
> > > > > pasting the first url in a browser)
> > > > >
> > > > > http://www.immoweb.be/NL/client/results.gallery.cfm?xidcategorie=&mycurrent_section=buy&xinitliste=Y&xnotsearch=Y
> > > > >
> > > > >
> > > > > My question,
> > > > >
> > > > > how can I use the wget tool to fetch the source code, generated by
> > > > > the automatically redirected url ?
> > > > >
> > > > > Greetz, Jan (janjansenbe_at_gmail.com)
> > > > >
> > > >
> > > >
> > >
> >
>
Received on 2005-09-30