A
A
Alexander Skipped2011-10-18 10:09:43
Perl
Alexander Skipped, 2011-10-18 10:09:43

Parsing HTML generated by JS

If there are confusing tricky pages, the data on which appears after the execution of the JS code, then how are they usually parsed?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Anatoly, 2011-10-18
@taliban

They look where JS (ajax) went,
what it added to the page
and what it changed, and get the result.

                With uv. Your K.O.

M
Mark, 2011-10-18
@printf

You can use some kind of Selenium and do everything in the browser (slowly, but very reliably).
You can, as mentioned above, mimic the behavior of js in your parser (quickly, but sometimes quite difficult).
See what the task is.

D
Dmitry, 2011-10-18
@Neir0

You have a pearl in the tags. As I would do on sharpe. You can use the ready-made webkit engine, ie. There the browser will do all the hard work for us, I think this is the easiest way. For pearls, there may also be appropriate wrappers. You can use the JS interpreter for sharp, there are many of them, but you need to figure out how to integrate it. In general it is necessary to look at a specific task.

C
Coderr, 2011-10-18
@Coderr

They look at the JS code, where it sends data, and how it receives it, and parse where it sent/received.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question