cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Enable javascript with curl

From: Ray Satiro via curl-users <curl-users_at_cool.haxx.se>
Date: Wed, 4 May 2016 13:51:08 -0400

On 5/4/2016 4:56 AM, Sourin Maiti wrote:
> What option to choose to get the real contect of a page in curl? I get
> below in return:
>
> <noscript>You have to enable javascript in your browser to use an
> application built with Vaadin.</noscript>.
>
> Note: I am able to see same message in view source as well.
>
> I tried to get the cookie from website then used that cookie to get
> the content but still getting same response. I do not have root access
> to the server so I am not able to install lynx or w3m.

In your case it may be easier to automate using javascript or imacros or
something as already mentioned. I would e-mail Vaadin and ask them
what's possible, they may have an API you can use for this. You can also
try monitoring in your browser to see the form as it's sent. Chrome and
Firefox have a 'copy as curl' command so that once you find the right
POST you can get the command needed to emulate it in curl [1]. You may
need more than one command if a login is required each time to get a
valid cookie. If that doesn't work you can try a web debugging proxy
like Fiddler and then assemble the commands yourself, which is more work.

I don't know why you'd install lynx or w3m.

[1]: https://daniel.haxx.se/blog/2015/11/23/copy-as-curl/

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-04