curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: redirect URL

From: Claudio Piga <claudio.piga_at_gmail.com>
Date: Tue, 21 Mar 2017 17:59:19 +0000

Hi Nicholas, sorry if I reply this way, but I do not seem to be able to
find a "reply to all" button in the mailing list page on the browser.
However your command
curl -sLvvvD- -o example.html "<url>"

produces a file with some content ( a list of hotels in the right
destination), but not the same content that is shown when the url is
directly used on a browser, especially in terms of the dates indicated in
the link, which I report here again for convenience:

http://www.booking.com/searchresults.html?src=index&nflt=&lang=en-gb&checkin_monthday=14&checkin_year_month=2017-6&checkout_monthday=15&checkout_year_month=2017-6&&group_adults=2&group_children=0&dest_type=city&dest_id=-1454990&selected_currency=GBP

So somehow curl is not mimicking the browser environment.

More importantly, there are some messages that would suggest that a
protection is operated:
[image: Inline image 1]

Thanks for your help.
Claudio

On Tue, Mar 21, 2017 at 2:07 PM, Nicholas Chambers <
nchambers_at_lightspeedsystems.com> wrote:

>
>
> On 3/21/17 8:47 AM, Claudio Piga wrote:
>
> Dear Curl users
> I am totally new to curl and its use, but I hope this query makes sense to
> you. Apologies if it is a rather mundane type of problem.
>
> I have to save queries for my research. I have to deal with urls of this
> kind:
>
> http://www.booking.com/searchresults.html?src=index&
> nflt=&lang=en-gb&checkin_monthday=14&checkin_year_month=2017-6&checkout_
> monthday=15&checkout_year_month=2017-6&interval_of_time=
> any&flex_checkin_year_month=any&&group_adults=2&group_
> children=0&dest_type=city&dest_id=-1454990&selected_currency=GBP&radius=2
>
> For brevity's sake, define this as <url>
>
> Using the DOS Command Prompt, from the directory where the curl.exe is
> stored, I issued the following command:
>
>
> *curl -o example.html <url> *
> I think curl does not seem to like all the &, so I also tried the version:
>
> I can't speak for the DOS shell, but to POSIX shells like bash or zsh, &
> is a special symbol meaning "run in the background". To cURL, there
> shouldn't be a difference. So you will indeed need to put it in quotes so
> that way it is passed to cURL without the shell parsing the URL.
>
>
>
> *curl -o example.html "<url>" *
>
> that is, I put the whole url in quotes.
> Note that the url (without quotes) works in a brower and downloads the
> relevant page. Unfortunately, the file created by curl is empty.
> Could you please refer me to the correct syntax for the curl command?
>
>
> That should be the correct syntax. What is the output of curl -sLvvvD- -o
> example.html "<url>" ?
>
> Many Thanks
> Claudio
>
> --
>
>
>
> -----------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
> Etiquette: https://curl.haxx.se/mail/etiquette.html
>
>
> --
> Nicholas Chambers
> Technical Support Specialistnchambers_at_lightspeedsystems.com1.800.444.9267 <(800)%20444-9267>www.lightspeedsystems.com
>
>
> -----------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
> Etiquette: https://curl.haxx.se/mail/etiquette.html
>
>

-- 
Professor Claudio Piga
Keele Management School
Keele University
Keele, Staffordshire, ST5 5BG
skype: claudio_piga
telephone 01782 733059
http://works.bepress.com/claudiopiga/
https://sites.google.com/site/claudiopiga/

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html

image.png
Received on 2017-03-21