F
F
felsme2019-05-04 01:23:14
JavaScript
felsme, 2019-05-04 01:23:14

How to parse sites where everything is built on JavaScript?

How to get the content that is loaded via ajax when capturing the html tree?
I know that there is selenium, but it takes too long through it + sometimes it is not desirable for someone to see the action script.
I will listen to any offers in any languages ​​and technologies

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
magersoft, 2019-05-04
@felsme

Puppeteer

P
Polishchuk88, 2019-05-04
@Polishchuk88

I looked in chrome in the developer console where ajax requests are sent and what parameters are passed in the header, then I make a request using curl on php and substitute the same parameters to simulate a browser. In response, either ready-made html comes - parsed on phpquery or json comes, which is even better not to be parsed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question