-
-
Notifications
You must be signed in to change notification settings - Fork 163
Open
Description
I want to be able to log in manually, without having to give my login data to the bot, I made a bot previously with this function but I don't know how to integrate it into TinderBotz, attached example:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
import time
# With the next command in the terminal I can log in to Tinder manually in Chrome and leave it loaded, so that the bot only has to enter and start sliding and does not have to log in:
#/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir="/Users/danielgaitanromero/Desktop/TinderBotv2"
opening_line = "Hi!"
number_of_swipes = 10
path = '/Users/danielgaitanromero/Downloads/chromedriver-mac-arm64/chromedriver'
service = Service (executable_path=path)
web = 'https://tinder.com'
options = Options()
options.add_experimental_option("debuggerAddress","localhost:9222")
driver = webdriver.Chrome(service=service, options=options)
driver.get(web)
time.sleep(3)
for i in range(number_of_swipes):
try:
like_button = driver.find_element(by='xpath', value='//button//span[text()="Like"]')
driver.execute_script("arguments[0].click();", like_button)
time.sleep(2)
its_match_window = driver.find_element(by='xpath', value='//textarea[@placeholder="Say something nice!"]')
its_match_window.send_keys(opening_line)
time.sleep(1)
send_message_button = driver.find_element(by='xpath', value='//button/span[text()="Send"]')
send_message_button.click()
time.sleep(1)
close_its_match_window = driver.find_element(by='xpath', value='//button[@title="Back to Tinder"]')
close_its_match_window.click()
except:
try:
box = driver.find_element(by='xpath', value='//button/span[text()="Maybe Later"] | //button/span[text()="Not interested"] | //button/span[text()="No Thanks"]')
box.click()
except:
pass
I would appreciate someone who helps me implement it in the bot, so that I can choose whether to log in manually or automatically.
Metadata
Metadata
Assignees
Labels
No labels