Answer the question
In order to leave comments, you need to log in
How to parse a dynamic page with initially loaded js elements?
Website - https://focus.kontur.ru/ .
It initially loads many elements through js when loading the page. For example, the same search bar and the "search" button. Probably specifically against parsers.
requests is not found, neither is selenium.
The script that most likely loads everything - https://widget-product.kontur.ru/widget/loader?pro... .
How can it be parsed?
[SOLVED]
Answer the question
In order to leave comments, you need to log in
I'm afraid the short answer is no.
This is to make the JS run by the native JS engine in the "native" browser environment.
Python html parsers do not support JS as a class (of course; this is not html parsing).
If you really need it, then try passing it through pdfkit (+ wkhtmltopdf) and parsing PDF as the output. It sounds like a mockery, but theoretically it is possible.
The second option is not to parse HTML, but instead of JS, ask AJAX questions to the server yourself.
But this is also only theoretical. If the server is done normally, then it will not allow this to be done.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question