M
M
Mikhail2019-06-08 19:24:10
Parsing
Mikhail, 2019-06-08 19:24:10

How to get js value of sparged page variable?

Good afternoon.
I want to translate one resource for myself, as well as send it offline.
The pages have an iframe that contains html with the required variable.
The variable is contained in a closed js function.
What is the best way to get it?
Initially, for parsing, I use webdriver in conjunction with php.

(function(document, player) {
var config = {} 
}(document, document.getElementById('player')));

That's exactly the contents of the config variable needed. Other contents inside may vary

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail, 2019-06-10
@mix_gorbachev

Solved the problem by writing a regular expression.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question