Discussion:
how do I press a button?
Add Reply
ToddAndMargo
2018-08-08 03:01:22 UTC
Reply
Permalink
Raw Message
Hi All,

From this page:

https://www.foxitsoftware.com/downloads/#Foxit-PhantomPDF-Education/

I want to press any of the three "free trial download" buttons
so that I can harvest the "Version" (9.2.0.9297) that appears
on the pop up.

How do I do this? (I don't care if I get a bunch of versions
as long as the current one is in there somewhere.)

Many thanks,
-T

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://cur
Dan Fandrich
2018-08-08 07:54:50 UTC
Reply
Permalink
Raw Message
Post by ToddAndMargo
Hi All,
https://www.foxitsoftware.com/downloads/#Foxit-PhantomPDF-Education/
I want to press any of the three "free trial download" buttons
so that I can harvest the "Version" (9.2.0.9297) that appears
on the pop up.
How do I do this? (I don't care if I get a bunch of versions
as long as the current one is in there somewhere.)
Take a look at the document at https://curl.haxx.se/docs/httpscripting.html
to find out how to do things from the curl end. You'll still have to figure out
exactly what to send and where, which you can generally figure out by staring
at the network traffic going past using your browser's developer tools.
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.
ToddAndMargo
2018-08-08 23:48:55 UTC
Reply
Permalink
Raw Message
Post by Dan Fandrich
Post by ToddAndMargo
Hi All,
https://www.foxitsoftware.com/downloads/#Foxit-PhantomPDF-Education/
I want to press any of the three "free trial download" buttons
so that I can harvest the "Version" (9.2.0.9297) that appears
on the pop up.
How do I do this? (I don't care if I get a bunch of versions
as long as the current one is in there somewhere.)
Take a look at the document at https://curl.haxx.se/docs/httpscripting.html
to find out how to do things from the curl end. You'll still have to figure out
exactly what to send and where, which you can generally figure out by staring
at the network traffic going past using your browser's developer tools.
Hi Dan,

Thank, you!

It looks like post is what I want. But I am going to have to
re-read it several times to get past the fog!

-T


-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https
ToddAndMargo
2018-08-09 02:50:12 UTC
Reply
Permalink
Raw Message
Post by ToddAndMargo
Post by Dan Fandrich
Post by ToddAndMargo
Hi All,
https://www.foxitsoftware.com/downloads/#Foxit-PhantomPDF-Education/
I want to press any of the three "free trial download" buttons
so that I can harvest the "Version" (9.2.0.9297) that appears
on the pop up.
How do I do this?   (I don't care if I get a bunch of versions
as long as the current one is in there somewhere.)
Take a look at the document at
https://curl.haxx.se/docs/httpscripting.html
to find out how to do things from the curl end. You'll still have to figure out
exactly what to send and where, which you can generally figure out by staring
at the network traffic going past using your browser's developer tools.
Hi Dan,
Thank, you!
It looks like post is what I want.  But I am going to have to
re-read it several times to get past the fog!
-T
This is the button I have to press:

<Li class="margin-bottom-10"><a class="btn red fix-btn free-download
phantomStd" data-toggle="modal" data-target="#FreeTrial"
name="phantomStd" onclick="dataLayer.push({'event':
'phantomStd-click'});">Free Trial Download</a></li>






-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiqu
Daniel Stenberg
2018-08-09 06:58:34 UTC
Reply
Permalink
Raw Message
onclick="dataLayer.push({'event': 'phantomStd-click'});"
Here's the clue 'onclick' means it'll run javascript on click. javascript can
then do basically anything in the browser.

To figure out what exact HTTP request that ends up doing, fire up your
browser's web tools and its network tab.
--
/ daniel.haxx.se
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.s
ToddAndMargo
2018-08-09 16:36:27 UTC
Reply
Permalink
Raw Message
Post by Daniel Stenberg
onclick="dataLayer.push({'event': 'phantomStd-click'});"
Here's the clue 'onclick' means it'll run javascript on click.
javascript can then do basically anything in the browser.
To figure out what exact HTTP request that ends up doing, fire up your
browser's web tools and its network tab.
Hi Daniel,

I have got it up right now (Firefox, tools, Web Developer, Network).
I am now trying to figure out what I am seeing.

All I want to do is see the data that pops up by default
on that form. I do not want to actually do anything with
the form.

Can you confirm for me that all I need to do is to figure out
how to click the button?

And, does this data also come down to me in the "--output",
or do I need to ask curl for something else?

Thank you for all the help with this!

-T

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette
David Colter
2018-08-09 17:48:33 UTC
Reply
Permalink
Raw Message
Todd,
Post by ToddAndMargo
I have got it up right now (Firefox, tools, Web Developer, Network).
I am now trying to figure out what I am seeing.
All I want to do is see the data that pops up by default
on that form. I do not want to actually do anything with
the form.
Then look into the Network tab, the browser page requests could be filtered, so click on All (top right) and click on your button. A bunch of rows should show up in the Network tab. Click on one of them to reveal more specific information about them on the right side. "Headers" is a good one, because it shows what the request looked like. This will contain most of what you need in order to mimic the request using curl.
Post by ToddAndMargo
Can you confirm for me that all I need to do is to figure out
how to click the button?
When you click the button, the browser executes whatever the button was programmed to to. Ultimately, that probably means to requesting a page or multiple pages (depending on what you want to see).
Post by ToddAndMargo
And, does this data also come down to me in the "--output",
or do I need to ask curl for something else?
You need to pay attention to the following items of the browser request to use curl: 1) the header, 2) the cookies, 3) the request type - GET or POST, and 4) the URL. Then you build a curl request to mimic this request. I suggest learning about verbose output, because you'll need to see the same items in the both the browser developer navigation and curl's verbose.

What you are diving into has a steep learning curve. Hang on, and eventually you will gain an understanding.

David
Daniel Stenberg
2018-08-09 22:02:11 UTC
Reply
Permalink
Raw Message
Post by David Colter
Click on one of them to reveal more specific information about them on the
right side. "Headers" is a good one, because it shows what the request
looked like. This will contain most of what you need in order to mimic the
request using curl.
Also: Firefox, Chrome and Safari all have a "copy as curl" feature built-in
into their web tools so once you find the exact HTTP request, you can ask the
tool to give you the command line for it!

Somewhat described in the curl book: https://ec.haxx.se/usingcurl-copyas.html
--
/ daniel.haxx.se
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://cur
Jeremy Nicoll
2018-08-09 20:35:15 UTC
Reply
Permalink
Raw Message
Post by ToddAndMargo
I have got it up right now (Firefox, tools, Web Developer, Network).
I am now trying to figure out what I am seeing.
There's no reason to try to work it out by intuition. Mozilla have
decent documentation for these tools, and - since the tools
change very often (getting better and better) - you probably need
to read that documentation at some point.

The Network tool is described at:
https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor

As well as being able to be got at from the menu you used, it's also
just one of several tabs available in what's called the "Web Console"
(which allows you to poke into the inner workings of a single web
page in great detail (the page from which the console is opened)).

FF also has a "Browser Console" which shows messages about
activity in the browser as a whole.

All of this is documented at:
https://developer.mozilla.org/en-US/docs/Tools
--
Jeremy Nicoll - my opinions are my own.
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https
ToddAndMargo
2018-08-10 21:53:02 UTC
Reply
Permalink
Raw Message
Post by ToddAndMargo
Hi All,
https://www.foxitsoftware.com/downloads/#Foxit-PhantomPDF-Education/
I want to press any of the three "free trial download" buttons
so that I can harvest the "Version" (9.2.0.9297) that appears
on the pop up.
How do I do this?   (I don't care if I get a bunch of versions
as long as the current one is in there somewhere.)
Many thanks,
-T
Got it!

$ curl
'https://www.foxitsoftware.com/downloads/downloadForm.php?product=Foxit-PhantomPDF-Business&language=English&platform=Windows'
-o - | grep 'option value="9.2'


used Firefox's web developer, network copy ...

Geez! Talk about a crash course on how the web works!

Thank you all for the help!

-T



-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.hax

Loading...