Я пытаюсь прокрутить вниз и ставить лайки постам на главной странице Instagram, а когда я пытаюсь go сделать следующее сообщение, оно снова появляется. Я пытаюсь go использовать имя класса следующего сообщения
Вот мой код
# Wait 3 second while the post-login page loads
time.sleep(3)
bot.find_element_by_xpath("//button[contains(text(), 'Not Now')]")\
.click()
time.sleep(3)
bot.find_element_by_xpath("//button[contains(text(), 'Not Now')]")\
.click()
time.sleep(3)
#Like the post
followButton = bot.find_element_by_class_name('fr66n')
followButton.click()
time.sleep(5)
#Go to the comment field
nex = bot.find_element_by_class_name('sH9wk')
time.sleep(1)
nex.click()
time.sleep(2)
#Go to next post ...but here it's again going to the first post
nex_post = bot.find_element_by_class_name('_9AhH0')
time.sleep(1)
nex_post.click()