Skip to content

Instantly share code, notes, and snippets.

@S-codes14
Created May 12, 2021 02:05
Show Gist options
  • Save S-codes14/c8820bf0ed54c814572e2876075b4753 to your computer and use it in GitHub Desktop.
Save S-codes14/c8820bf0ed54c814572e2876075b4753 to your computer and use it in GitHub Desktop.
Tried to ceate a tik tok auto views bot, there are three diferent ways choose which one is great for you
from selenium import webdriver
from selenium.webdriver.support.ui import Select
import pyfiglet
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
# from selenium.webdriver import Firefox
from selenium.webdriver.firefox.options import Options
from time import sleep
def loop1():
global i
sleep(10)
try:
driver.find_element_by_xpath("//*[@id=\"main\"]/div/div[4]/div/button").click()
except:
print("You didn't solve the captcha yet. Need to refresh to avoid endless loop.")
driver.refresh()
loop1()
try:
sleep(2)
driver.find_element_by_xpath("//*[@id=\"sid4\"]/div/div/div/form/div/input").send_keys(vidUrl)
sleep(1)
driver.find_element_by_xpath("//*[@id=\"sid4\"]/div/div/div/form/div/div/button").click()
sleep(2)
driver.find_element_by_xpath("//*[@id=\"c2VuZC9mb2xsb3dlcnNfdGlrdG9V\"]/div[1]/div/form/button").click()
sleep(10)
driver.refresh()
i += 1
total = i * 500
print("Views success delivered! Total", total,"views")
sleep(360)
loop1()
except:
print("A generic error occurred. Now will retry again")
driver.refresh()
sleep(20)
loop1()
def loop2():
sleep(10)
try:
driver.find_element_by_xpath("/html/body/div[4]/div[1]/div[3]/div/div[2]/div/button").click()
except:
print("You didn't solve the captcha yet. Need to refresh to avoid endless loop.")
driver.refresh()
loop2()
try:
sleep(2)
driver.find_element_by_xpath("/html/body/div[4]/div[3]/div/div/div/form/div/input").send_keys(vidUrl)
sleep(1)
driver.find_element_by_xpath("/html/body/div[4]/div[3]/div/div/div/form/div/div/button").click()
sleep(10)
driver.find_element_by_xpath("/html/body/div[4]/div[3]/div/div/div/div/div[1]/div/form/button").click()
sleep(10)
hearts = driver.find_element_by_xpath('//*[@id="c2VuZE9nb2xsb3dlcnNfdGlrdG9r"]/span').text
sleep(55)
print(hearts," Success delivered! Thank me with a $ 1 donation on GitHub")
sleep(100)
driver.refresh()
sleep(200)
loop2()
except:
print("A generic error occurred. Now will retry again")
driver.refresh()
sleep(355)
loop2()
def loop3():
sleep(10)
try:
driver.find_element_by_xpath("/html/body/div[4]/div[1]/div[3]/div/div[3]/div/button").click()
except:
print("You didn't solve the captcha yet. Need to refresh to avoid endless loop.")
driver.refresh()
loop2()
try:
sleep(2)
driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div/form/div/input").send_keys(vidUrl)
sleep(1)
driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div/form/div/div/button").click()
sleep(5)
driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div/div/div[1]/div/form/button").click()
sleep(5)
driver.find_element_by_xpath("/html/body/div[4]/div[4]/div/div/div/div/form/ul/li/div/button").click()
sleep(47)
driver.refresh()
print("Success delivered! Thank me with a $ 1 donation on GitHub")
loop3()
except:
print("A generic error occurred. Now will retry again")
driver.refresh()
sleep(50)
loop3()
def loop4():
sleep(20)
wait_time = 660 #11 minutes
try:
driver.find_element_by_xpath("/html/body/div[4]/div[1]/div[3]/div/div[1]/div/button").click() #Followers
except:
print("You didn't solve the captcha yet. Need to refresh to avoid endless loop.")
driver.refresh()
loop4()
try:
sleep(20)
driver.find_element_by_xpath("/html/body/div[4]/div[2]/div/div/div/form/div/input").send_keys(vidUrl) #Write
sleep(2)
driver.find_element_by_xpath("//*[@id=\"sid\"]/div/div/div/form/div/div/button").click() #Search
sleep(20)
driver.find_element_by_xpath("//*[@id=\"c2VuZF9mb2xsb3dlcnNfdGlrdG9r\"]/div[1]/div/form/button").click() #AddFollowers
sleep(wait_time/3)
print("Success delivered! Thank me with a $ 1 donation on GitHub")
sleep(wait_time/3)
driver.refresh()
sleep(wait_time/3)
loop4()
except:
print("A generic error occurred. Now will retry again")
driver.refresh()
sleep(wait_time)
loop4()
def loop5():
sleep(20)
try:
driver.find_element_by_xpath("/html/body/div[4]/div[1]/div[3]/div/div[5]/div/button").click()
except:
print("You didn't solve the captcha yet. Need to refresh to avoid endless loop.")
driver.refresh()
loop5()
try:
sleep(20)
driver.find_element_by_xpath("/html/body/div[4]/div[6]/div/div/div/form/div/input").send_keys(vidUrl) # Write
sleep(2)
driver.find_element_by_xpath("/html/body/div[4]/div[6]/div/div/div/form/div/div/button").click() # Search
sleep(20)
driver.find_element_by_xpath("/html/body/div[4]/div[6]/div/div/div/div/div[1]/div/form/button").click() # AddShares
sleep(60)
print("Shares sent! Thank me with a $ 1 donation on GitHub")
sleep(1700)
except:
print("A generic error occurred. Now will retry again")
driver.refresh()
sleep(300)
loop5()
def loop6():
sleep(1000)
driver.refresh()
print("Reload")
loop5()
print("Author: https://github.com/S-codes14")
vidUrl = "https://www.tiktok.com/@sifisowiseman5/video/6958519470558039297" #Change it
bot = int(input("What do you want to do?\n1 - Auto views(500)\n2 - Auto hearts\n3 - Auto (FIRST) comments heart\n4 - Auto followers\n5 - [NEW]Auto Share\n6 - Simple reload\n"))
i = 0
# chrome_options = webdriver.ChromeOptions()
# #chrome_options.add_argument('--headless')
# chrome_options.add_argument('--no-sandbox')
# chrome_options.add_argument('--disable-dev-shm-usage')
# driver = webdriver.Chrome(executable_path=r'./chromedriver',chrome_options=chrome_options) #Change it
opts = Options()
opts.headless = True
binary = FirefoxBinary('/home/sibongumusa/Desktop/TikBot/TikTok-Follow-Heart-Views-Bot-main/geckodriver')
# driver = webdriver.Firefox(options=opts, firefox_binary=binary)
driver = webdriver.Firefox(executable_path=r'/home/sibongumusa/Desktop/TikBot/TikTok-Follow-Heart-Views-Bot-main/geckodriver', options=opts) #Change it
# binary = FirefoxBinary('path/to/installed firefox binary')
# browser = webdriver.Firefox(firefox_binary=binary)
driver.set_window_size(1024, 650)
driver.get("https://vipto.de/")
if bot == 1:
loop1()
elif bot == 2:
loop2()
elif bot == 3:
loop3()
elif bot == 4:
loop4()
elif bot == 5:
loop5()
elif bot == 6:
loop5()
else:
print("You can insert just 1, 2, 3, 4, 5 or 6")
from selenium import webdriver
from selenium.webdriver.support.ui import Select
import pyfiglet
from os import system
import time
from webdriver_manager.firefox import GeckoDriverManager
from selenium.webdriver.firefox.options import Options
# from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
opt = Options()
#chrome_options.add_argument("--headless")
# chrome_options.add_argument("--log-level=3")
# opt.setLogLevel(3.trace)
# opt.setLogLevel(3)
driver = webdriver.Firefox(executable_path=r'/home/sibongumusa/Desktop/TikBot/TikTok-Follow-Heart-Views-Bot-main/geckodriver', options=opt)
driver.set_window_size(1024, 650)
"""
def loop1():
time.sleep(60)
try:
driver.find_element_by_xpath("/html/body/main/div/div/div[2]/div/div[1]/div[3]/div/div/button").click()
except:
print("You didn't solve the captcha yet")
loop1()
time.sleep(2)
try:
driver.find_element_by_xpath("/html/body/main/div/div/div[2]/form/div/input").send_keys(username)
except:
print("Delay")
driver.refresh()
loop1()
time.sleep(2)
driver.find_element_by_xpath('//button[@type="submit"]').click()
time.sleep(2)
try:
driver.find_element_by_xpath("/html/body/main/div/div/div[2]/div/button").click()
except:
print("Either failed to input or can't find the button. Need to retry")
driver.refresh()
loop1()
time.sleep(2)
print("Fans success delivered!")
driver.refresh()
time.sleep(250)
loop1()
"""
def loop2():
time.sleep(60)
try:
driver.find_element_by_xpath("/html/body/main/div/div/div[2]/div/div[1]/div[3]/div/div/button").click()
except:
print("You didn't solve the captcha yet")
loop2()
time.sleep(2)
try:
driver.find_element_by_xpath("/html/body/main/div/div/div[2]/form/div/input").send_keys(vidUrl)
except:
print("Delay")
driver.refresh()
loop2()
time.sleep(2)
driver.find_element_by_xpath('//button[@type="submit"]').click()
time.sleep(2)
try:
driver.find_element_by_xpath("/html/body/main/div/div/div[2]/div/div/div/h5/button[2]").click()
except:
print("Either failed to input or can't find the button. Need to retry")
driver.refresh()
loop2()
time.sleep(2)
print("Views success delivered!")
driver.refresh()
time.sleep(250)
loop2()
"""
def loop3():
time.sleep(60)
try:
driver.find_element_by_xpath("/html/body/main/div/div/div[2]/div/div[1]/div[3]/div/div/button").click()
except:
print("You didn't solve the captcha yet")
loop3()
time.sleep(2)
try:
driver.find_element_by_xpath("/html/body/main/div/div/div[2]/form/div/input").send_keys(vidUrl)
except:
print("Delay")
driver.refresh()
loop3()
time.sleep(2)
driver.find_element_by_xpath('//button[@type="submit"]').click()
time.sleep(2)
try:
driver.find_element_by_xpath("/html/body/main/div/div/div[2]/div/div/div/h5/button[1]").click()
except:
print("Either failed to input or can't find the button. Need to retry")
driver.refresh()
loop3()
time.sleep(2)
print("Hearts success delivered!")
driver.refresh()
time.sleep(250)
loop3()
"""
vidUrl = "https://www.tiktok.com/@sifisowiseman5/video/6958519470558039297" #Change YOUR_URL to your Tik Tok video URL
username = "@sifisowiseman5" #Change YOUR_USERNAME to your Tik Tok username
system("cls")
tiktod = pyfiglet.figlet_format("TIKTOD V2", font="slant")
print(tiktod)
print("Author: https://github.com/S-codes14")
print("")
"""
You can change auto value below
auto = 1 for auto fans (NEW UPDATE: They removed auto fans for now)
auto = 2 for auto views
auto = 3 for auto hearts (NEW UPDATE: They removed auto hearts for now)
"""
auto = 1
if auto == 1:
driver.get("https://homedecoratione.com/")
loop1()
elif auto == 2:
driver.get("https://homedecoratione.com/")
loop2()
else:
driver.get("https://homedecoratione.com/")
loop3()
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from os import system
from time import sleep
import sys
import colorama
from colorama import init
init()
from colorama import Fore, Back, Style
options = webdriver.FirefoxOptions()
options.add_experimental_option("excludeSwitches", ["enable-logging"])
driver = webdriver.Firefox(options=options, executable_path="/home/sibongumusa/Desktop/TikBot/TikTok-Follow-Heart-Views-Bot-main/geckodriver")
def views(Url):
driver.get('https://vipto.de/')
sleep(10)
try:
driver.find_element_by_xpath('/html/body/div[4]/div[1]/div[3]/div/div[4]/div/button').click()
except:
print(Fore.RED + 'Solve the captcha on the Chrome page')
driver.refresh()
views(Url)
else:
try:
sleep(2)
driver.find_element_by_xpath('//*[@id=\"sid4\"]/div/div/div/form/div/input').send_keys(Url)
sleep(2)
driver.find_element_by_xpath('//*[@id=\"sid4\"]/div/div/div/form/div/div/button').click()
sleep(2)
driver.find_element_by_xpath('//*[@id=\"c2VuZC9mb2xsb3dlcnNfdGlrdG9V\"]/div[1]/div/form/button').click()
sleep(10)
driver.refresh()
print(Fore.GREEN + '500 Views success delivered!')
sleep(80)
views(Url)
except:
print(Fore.RED + 'An error occured. Retry again')
driver.refresh()
sleep(20)
views(Url)
print(Fore.GREEN)
url = input('Please enter here TikTok video URL: \n')
print(Fore.WHITE)
views(url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment