+5 votes
by
Actually a subject.
For example to log in via curl no problem.
Then get the html and all the js scripts that are there.
But how to run them from the console?

PS please Tell me why I need it.
Is there a website where I need to balance every day.
API the site is not.
And to pull the balance, you need to log in your personal account.
There is 100500 js scripts with POST and GET requests, like this:
https://site.com/core/auth/account_list?callback=jQuery110205813025929261137_1441171203113&_=1441171203115

Then using jquery.append substitutes the value of the balance in the html tag.
by
The DOM tree is a representation of the nodes in the program memory. Then what is with this tree?
by
Novel : Updated my question.

4 Answers

0 votes
by
In my opinion, you need to type Selenium .
Need to program a script how to find the right node and how to get the data of that node.
0 votes
by
zombiejs, phantomjs.
by
No )

Your script needs to do everything itself, for example:

Go to the website at the address site/login
Fill out the authorization form
Click the log in button
Go to the page site/balance
Get value from div with id = "money"
Well, then keep what you want, get to the screen etc
by
nonlux : Thank you. But I don't know where to start.
So I went to the personal account. Pumped out all the html and js scripts.
What I need to do next?
by
nonlux : Yes, of course I went through the script in to your personal account.
Logged. Received html page of the personal account.
Where should be the balance blank, because it fills the js that runs after entering the page.
by
Take know php behat + mink + zombiejs and write their actions stupid in Russian in behat feature
by
I told you about using those tools that I described in the answer. If you're going to use zombiejs, for example. He will perform all the js on the page.
0 votes
by
On Windows I use VBS and the Internetexplorer object.Application
by
This is the advantage of Windows. From the console Linux it is harder.
0 votes
by
Look in the JS resource, which is requested to receive the balance (since balance is substituted JS'Ohm?) and request it with the cooks via the console.
Perhaps even a cookie substitute is not necessary.
And talk to the developer about creating an API
by
pcdesign : contact the developer and agree on the establishment of API
by
Anton Nowhere in the body of the response, no jQuery110205....
But found another joke.
Not to write in jQuery110205813025929261137_1441171203113&_=1441171203115.
You can write any nonsense, it still works.
And the balance turns out, I did see the answer jsona.
So nothing is clear :)
by
Balance requested from js like so:
https://site.com/core/auth/account_list?callback=jQuery110205813025929261137_1441171203113&_=1441171203115


The numbers are always different.
But this line is formed in the other js scripts:
110205813025929261137_1441171203113&_=1441171203115
How - is not clear.
by
pcdesign : the first parameter is the name of the function that you will need to call with the results of the script view in the body of the response, a response starts with something like jQuery110205813025929261137_1441171203113(. You do not need it and can be arbitrary.
The second parameter is likely Antiques banal, very similar to timestamp
...