P
P
pcdesign2015-09-02 11:29:42
linux
pcdesign, 2015-09-02 11:29:42

How to enter the site from the console, log in, execute all js scripts and get the DOM tree?

Actually a subject.
Let's say logging into your personal account via curl is not a problem.
Next, we get html and all js scripts that are there.
But how to execute them from the console?

PS I'll tell you why I need it.
There is a site from which I need to receive a balance every day.
The site does not have an API.
And to pull the balance, you need to go to your personal account.
100500 js scripts are executed there with POST and GET requests, like this:

https://site.com/core/auth/account_list?callback=jQuery110205813025929261137_1441171203113&_=1441171203115

After that, through jquery.append, the balance value is substituted into the html tag.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman Mirilaczvili, 2015-09-02
@2ord

I think you need software like Selenium .
You need to program a script how to find the desired node and how to get the data of that node.

N
nonlux, 2015-09-02
@nonlux

zombiejs, phantomjs.

P
PO6OT, 2015-09-02
@woonem

Look in JS for the resource that is requested to get the balance (after all, the balance is substituted by JS?) and request it with cookies through the console.
You may not even need to set cookies.
Also, talk to a developer about creating an API

E
Emil Revencu, 2015-09-10
@Revencu

On Windows I use VBS and the Internetexplorer.Application object

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question