i’m having some trouble but i don’t know if it’s selenium or logic related. Just a little context:
z = 0
m = 1
if z < 6:
next_page_path = f'//li[@class="arrow"][{m}]'
next_boton = driver.find_element(
by=By.XPATH,
value=next_page_path
)
### THE PROBLEM IS HERE ###
next_boton.click()
m = 2
z += 1
This is a part of a long for loop, it’s all fine but when it get’s to clicking the “next” arrow it’s starts again and the second time it really clicks and changes to the next page. The result is that i scrape the same information twice, all the rest of the code seems to work fine but when it get’s to the clicking i just don’t know.
It’s really weird because i’ve added waits for a long time (to give it time to load) but i don’t know anymore, the element seems to appear but maybye i’m doing something wrong