Answer the question
In order to leave comments, you need to log in
Hello, the project crashes when launched in Python, what should I do?
from selenium import webdriver
from os import system, name
from time import time, strftime, gmtime, sleep
import pyfiglet, os, threading
def clear():
if name == 'nt':
_ = system('cls')
else:
_ = system('clear')
clear()
system('title TIKTOD V3')
print(pyfiglet.figlet_format("TIKTOD V3", font="slant"))
print("1. RepBot.\n2. Credits.\n ")
auto = int(input("Mode: "))
if auto == 1 or auto == 2:
vidUrl = input("TikTok video URL: ")
start = time()
time_elapsed = strftime('%H:% M:%S',gmtime(time() - start))
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--mute-audio")
chrome_options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(r"chromedriver.exe", options=chrome_options)
driver.set_window_size(1024 , 650)
Report = 0
def beautify(arg):
return format(arg, ',d').replace(',', '.')
def title1(): # Update the title IF option 1 was picked.
global Report
while True:
time_elapsed = strftime('%H:%M:%S', gmtime(time() - start))
system(f'title TIKTOD V3 ^| Report Sent: {beautify(Report)} ^| Elapsed Time: {time_elapsed}')
def loop1():
driver.find_element_by_xpath("//*[@id="app"]/div[2]/div[2]/div[1]/div[1]/div/div[2]/div[1]/div /p").click()
sleep(2)
driver.find_element_by_xpath("/html/body/div[4]/div[2]/form/div[2]/label[5]").click()
sleep (2)
driver.find_element_by_xpath("/html/body/div[4]/div[2]/form/div[2]/div[3]/button").click()
sleep(2)
driver.find_element_by_xpath( "/html/body/div[4]/div[2]/div/div/button").click()
driver.refresh()
Report += 1
print("[+] Report sent!")
sleep(20 )
loop1()
except:
print("[-] An error occured. Retrying..")
driver.refresh()
loop1()
if auto == 1:
driver.get(vidUrl)
a = threading.Thread(target=title1)
b = threading.Thread(target=loop1)
a.start()
b.start()
elif auto == 2 :
print("[+] This program was created by @ded_sec_.")
else:
print(f"{auto} is not a valid option. Please pick 1 or 2")
Answer the question
In order to leave comments, you need to log in
What-to-do, what-to-do... Catch him so that he doesn't fly out.
You read your question.
What flies out, at what moment flies out, what does it tell you? What operating system? What version of Python? What versions of modules are used? What logs? You have all this information, but you probably think that this is a forum of psychics who are able to guess the answers to these questions themselves? Are you even too lazy to structure your code properly?
Well, if this program is "This program was created by @ded_sec_" - then refer to this mysterious ded_sec_ , let him answer you. Forum something here and?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question