Created
November 24, 2020 07:34
-
-
Save cawa87/92ec6fce61c87c54cba8dcd969344310 to your computer and use it in GitHub Desktop.
Topface likes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from time import sleep | |
class TopfaceBot(): | |
def __init__(self): | |
self.driver = webdriver.Chrome() | |
def login(self): | |
self.driver.get('https://topface.com') | |
login_btn = self.driver.find_element_by_xpath('/html/body/div[1]/div[1]/div[2]/div[5]/div[3]/button') | |
login_btn.click() | |
sleep(3) | |
email_btn = self.driver.find_element_by_xpath('//*[@id="form_auth_login"]') | |
email_btn.send_keys('mail') | |
pass_btn = self.driver.find_element_by_xpath('//*[@id="form_auth_password"]') | |
pass_btn.send_keys('pass') | |
sign_btn = self.driver.find_element_by_xpath('//*[@id="btn_auth"]') | |
sign_btn.click() | |
def like(self): | |
like_btn = self.driver.find_element_by_xpath('//*[@id="mainWrapper"]/div[1]/div[2]/div[2]/div[1]/div[3]/div[2]/div[4]/div[3]') | |
like_btn.click() | |
sleep(5) | |
def autolike(self): | |
while True: | |
self.like() | |
bot = TopfaceBot() | |
bot.login() | |
bot.autolike() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment