Answer the question
In order to leave comments, you need to log in
How to parse content generated by JS in Python. What do you advise?
I'm new to this business, so I'll ask you not to throw stones at me right away)
Today, wherever you look, JS is everywhere. Which actually significantly complicates parsing, at least in Python for sure.
Two libraries: Requests in conjunction with bs4 is not enough. Or I don’t know something, in which case I would be grateful if you poke your nose where it should be (in the documentation).
Actually the question is: how and with what help is it best to parse certain content from pages that are generated by JS? Thanks
in
advance for your replies.
Answer the question
In order to leave comments, you need to log in
Or I don’t know something, in which case I would be grateful if you poke your nose
Depends on content. Either selenium or, if you need to parse what the page loads via the API, then you can intercept the request to the API and write your own implementation on requests\aiohttp\ to taste.
support. Selenium is not always needed (and for a long time, sometimes). First, study how the server gives content (or attach a link to the service). Sometimes, you just need to dig into how requests leave and how they return. And no Selenium is needed.
there are slightly lighter tools with JS processing, but they are all more complicated, so Selenium
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question