Bot for badoo via selenium
In general, I am writing a bot for badoo and there is a problem.In short, there is a function "People nearby", there are people of your city or close, so it happens that when you choose a person there are two buttons to write or like, but you can not write to everyone, because you need to wait for a mutual like.So this part of the code that I will show should do so that if a person can not be written,then the bot goes back and looks for a new person,but I have a problem that the bot just starts either reloading the page or trying to write to the same person.Here is the code:
def peopleAround(x):
i = 0
browser.get("https://badoo.com/search")
ranDelay()
index = 0
try:
while x >= i:
akks = browser.find_elements_by_class_name("users-list__cell")
ActionChains(browser).move_to_element(akks[index]).perform()
delay(1000)
try:
if elementCheckClass("user-card__action--yes"):
like = browser.find_elements_by_class_name('user-card__action--yes')
like[index].click()
except Exception as e:
print(e)
delay(1000)
buttons = browser.find_elements_by_class_name('user-card__action--chat')
buttons[index].click()
index += 1
delay(1000)
0