Home python How to loop through the Selenium PYTHON “chatlist” DIVa elements

How to loop through the Selenium PYTHON “chatlist” DIVa elements

Author

Date

Category

I wrote a script to iterate over all chats inside DIVa on the site (I can provide the site, but there you need to log into a special account, access to which I cannot publish for everyone).

Everything works and iteration over the created list goes fine BUT. The site has a script that loads a maximum of 30 chats into HTML. Even if you scroll down, those chats that are higher are removed and new ones take their place, something like redefining variables. How can you make it so that you can go through all the chats down. Can re-create the list somehow.


Answer 1

Look at the network tab in dev-tools, most likely the chat data is loaded via fetch, write your request (or several consecutive ones) that will return everything
data about chats, well, I think selenium is redundant for this, I would look towards requests

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions