L
L
Lim_Drake2020-11-28 21:58:31
Python
Lim_Drake, 2020-11-28 21:58:31

How to organize the transition through the pages of the site when parsing?

Hello! I am writing a parser for the Cian site ( https://cian.ru/ ), using Selenium to collect phone numbers from the site.
Actually the question is, the site does not have a button to go to the next page, then it would be easy to organize, I think.
All buttons have the same class:

html button code
5fc29c5599513564140088.png

What does it look like
5fc29e96b8c93676997021.png

This is the code from page 2, the class of the page we are on is supplemented with another one (_93444fe79c--list-item--active--3dOSi)
Is it possible to make a transition on the button next to the active one?
As I think, it will not be possible to do just searching for a button by the desired class, because they have the same class, or am I wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2020-11-28
@Lim_Drake

Either I did not understand something, or why complicate everything so much.
Here's the link:

https://www.cian.ru/cat.php?deal_type=sale&engine_version=2&offer_type=flat&p=8&region=1&room1=1&room2=1

The p parameter is responsible for the current page. As you can see from the url, it is now the 8th page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question