Answer the question
In order to leave comments, you need to log in
How to interpret JavaScript when requesting requests?
Faced one problem. When parsing a site, you need to get some elements that are loaded onto the page via JavaScript. But requests in python doesn't interpret JavaScript, just the whole page. How can I make requests also interpret JavaScript?
Answer the question
In order to leave comments, you need to log in
No way. requests is not intended for this. You need a full browser, and code to manage it.
Those. selenium package.
EDIT: AlexBoss rightly pointed out below - if the site is not trying too hard to weed out bots, then you can try to identify the requests through which the loading of the interesting parts of the page is performed, and execute them yourself. This will make it possible to get by with requests alone, but this is not always easy to do.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question