P
P
Pasha Andreev2014-04-03 07:37:19
JavaScript
Pasha Andreev, 2014-04-03 07:37:19

How to parse ajax web page?

What are the methods and tools for parsing a page whose content is loaded via ajax when scrolling?
I suggest some options:
1) Analyze what type and address the ajax request is sent to, emulate these actions and parse the response.
2) Use browser automation tools (PhantomJS, selenium).
Suggestions, wishes, ideas?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
maxaon, 2014-04-03
@Argentum88

If you need to parse two or three sites, then of course the first option. If there is a lot or complex logic - then a phantom, it's not so difficult.
If you do not parse for a long time and not often - a userscript / plugin for parsing. Opened the browser, pressed the button, waited, downloaded the file.

A
Alexander, 2014-04-03
@SashaSkot

You described the only correct option under number 1. If you want hardcore and sex, you can implement it through a browser component and track container changes. But this is Thermorectal cryptanalysis.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question