Closed LucasHisabf closed 8 months ago
Please provide the full error
i think i instaled the wrong one im going to try again
Please provide the full error
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββ¦ββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββ¦ββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Made by : Simon Farah Github : https://github.com/simonfarah/tiktok-bot
[~] Loading driver, please wait... [!] Error loading driver: Message: session not created: Chrome failed to start: exited normally. (session not created: DevToolsActivePort file doesn't exist) (The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace:
I'll check that
vou verificar isso
okey i tried with sudo but got the same error too
Forneça o erro completo i made some changes and no im getting a new error
from os import system from time import sleep from colorama import init, Fore from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.chrome.options import Options from selenium.common.exceptions import NoSuchElementException
init(autoreset=True)
class Bot: def init(self): system("cls || clear") self.printBanner() print(Fore.YELLOW + "[~] Loading driver, please wait...")
try:
options = Options()
options.add_argument(
"--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
)
options.add_argument('--remote-debugging-pipe') # Adiciona o argumento aqui
self.driver = webdriver.Chrome(options=options)
print(Fore.GREEN + "[+] Driver loaded successfully")
print()
except Exception as e:
print(Fore.RED + f"[!] Error loading driver: {e}")
exit()
self.url = "https://zefoy.com"
self.captcha_xpath = "/html/body/div[5]/div[2]/form/div/div/div/div/button"
self.services = {
"followers": {
"title": "Followers",
"xpath": "/html/body/div[6]/div/div[2]/div/div/div[2]/div/button",
"status": None,
},
"hearts": {
"title": "Hearts",
"xpath": "/html/body/div[6]/div/div[2]/div/div/div[3]/div/button",
"status": None,
},
"comment_hearts": {
"title": "Comment Hearts",
"xpath": "/html/body/div[6]/div/div[2]/div/div/div[4]/div/button",
"status": None,
},
"views": {
"title": "Views",
"xpath": "/html/body/div[6]/div/div[2]/div/div/div[5]/div/button",
"status": None,
},
"shares": {
"title": "Shares",
"xpath": "/html/body/div[6]/div/div[2]/div/div/div[6]/div/button",
"status": None,
},
"favorites": {
"title": "Favorites",
"xpath": "/html/body/div[6]/div/div[2]/div/div/div[7]/div/button",
"status": None,
},
}
def start(self):
self.driver.get(self.url)
print(Fore.MAGENTA + "[!] In case of a 502 Bad Gateway error")
print(Fore.MAGENTA + "[!] please refresh the page")
print()
self.wait_for_xpath(self.captcha_xpath)
print(Fore.YELLOW + "[~] Please complete the captcha")
self.wait_for_xpath(self.services["followers"]["xpath"])
print(Fore.GREEN + "[+] Captcha completed successfully")
print()
self.driver.minimize_window()
self.check_services()
for index, service in enumerate(self.services):
title = self.services[service]["title"]
status = self.services[service]["status"]
print(Fore.BLUE + f"[{str(index + 1)}] {title}".ljust(20), status)
while True:
try:
choice = int(input(Fore.YELLOW + "[-] Choose an option : "))
except ValueError:
continue # This ensures the loop continues after a ValueError
if choice in range(1, 7):
break
self.select_service(choice)
def select_service(self, choice):
div = 6 + choice
service_key = list(self.services.keys())[choice - 1]
self.driver.find_element(By.XPATH, self.services[service_key]["xpath"]).click()
print()
video_url = input(Fore.MAGENTA + "[-] Video URL : ")
print()
self.start_service(div, video_url)
def start_service(self, div, video_url):
url_input_xpath = f"/html/body/div[{div}]/div/form/div/input"
search_btn_xpath = f"/html/body/div[{div}]/div/form/div/div/button"
send_btn_xpath = f"/html/body/div[{div}]/div/div/div[1]/div/form/button"
input_element = self.driver.find_element(By.XPATH, url_input_xpath)
input_element.clear()
input_element.send_keys(video_url)
while True:
# Click the search button
self.driver.find_element(By.XPATH, search_btn_xpath).click()
# Attempt to click the send button if it's present
try:
WebDriverWait(self.driver, 5).until(
EC.element_to_be_clickable((By.XPATH, send_btn_xpath))
).click()
except TimeoutException:
# If the send button isn't found, click the search button again
self.driver.find_element(By.XPATH, search_btn_xpath).click()
remaining_time = self.check_remaining_time(div)
if remaining_time is not None:
print(Fore.YELLOW + f"[~] Sleeping for {remaining_time} seconds")
sleep(remaining_time)
def check_remaining_time(self, div):
remaining_time_xpath = f"/html/body/div[{div}]/div/div/span[1]"
try:
element = self.driver.find_element(By.XPATH, remaining_time_xpath)
text = element.text
if "Please wait" in text:
minutes = text.split("Please wait ")[1].split(" ")[0]
seconds = text.split(" second")[0].split()[-1]
sleep_duration = int(minutes) * 60 + int(seconds) + 5
return sleep_duration
else:
return None
except NoSuchElementException:
return None
def check_services(self):
for service in self.services:
xpath = self.services[service]["xpath"]
try:
element = self.driver.find_element(By.XPATH, xpath)
if element.is_enabled():
self.services[service]["status"] = Fore.GREEN + "[WORKING]"
else:
self.services[service]["status"] = Fore.RED + "[OFFLINE]"
except NoSuchElementException:
self.services[service]["status"] = Fore.RED + "[OFFLINE]"
def wait_for_xpath(self, xpath):
while True:
try:
self.driver.find_element(By.XPATH, xpath)
return True
except NoSuchElementException:
sleep(1)
def printBanner(self):
print(
"""
new error
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββ¦ββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββ¦ββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Made by : Simon Farah Github : https://github.com/simonfarah/tiktok-bot
[~] Loading driver, please wait... [!] Error loading driver: Message: session not created: Chrome failed to start: exited abnormally. (timeout: Timed out receiving message from renderer: 60.000) (The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Stacktrace:
Forneça o erro completo
man tu Γ© brasileiro kkkkkkkkkk add discord ae namoral
what i do?