Forum
>>
Programmazione Python
>>
IDE ed Editor
>>
Pycharm bot scritto da me non funziona più
Pagina: 1
Esegui il login per scrivere una risposta.
Pagina: 1
Scritto da Alfaromeoista |
2023-09-07 10:37:03 - Pycharm bot scritto da me non funziona più
|
Sono il proprietario del sito che voglio "bottare" per test ecco la prova (no spam) https://yarevival.flarum.cloud/d/273-amici-di-pythonit-ciao
Andiamo avanti ho scritto questo bot tempo fa e ora non funziona! La prova che funzionava https://youtu.be/lsek4Pzz06Y?si=VoMtW8kJY_xuFMDK from selenium import webdriver import undetected_chromedriver.v2 as uc import time from random_username.generate import generate_username driver = uc.Chrome() with driver: driver.get('https://yarevival.flarum.cloud/') logo = color.HEADER + ''' Author: @POPEYE EL POPE Version: 1.0 ####################################### DISCLAIMER ######################################## | Trolletto tool is a tool that allows you to use to bot some no sense accounts to the | | DUCE's site. . Please use this tool responsibly. | | I am NOT responsible for any damages caused or any crimes committed by using this tool. | ########################################################################################### ''' print(logo) x=0 while x < 1: import time time.sleep(4) from random_username.generate import generate_username driver.find_element_by_class_name('item-signUp') elem = driver.find_element_by_class_name('item-signUp').click() time.sleep(1) #il programma aspetta che si carica la pagina driver.find_element_by_name('username') userName = driver.find_element_by_name('username') name=generate_username(1) #richiamare l'elemento con name0 per avere la stringa userName.send_keys( str(name0)) #da qui con send-keys il bot inizia a digitare driver.find_element_by_name('email') mailField = driver.find_element_by_name('email') mailField.click() mailField.send_keys(f"{name0}@ADMINBRUTTO.IT") driver.find_element_by_name('password') passWord = driver.find_element_by_name('password') passWord.click() passWord.send_keys('arandomshittypasword') #driver.find_element_by_xpath('//*[@id="modal"]/div/div/div/form/div2/div2/div5/button') register = driver.find_element_by_xpath('//*[@id="modal"]/div/div/div/form/div2/div2/div5/button') #div registrati di domandina #register = driver.find_element_by_xpath('//*[@id="modal"]/div/div/div/form/div2/div2/div4/button') #div free flarum register.click() time.sleep(3) prifileOut = driver.find_element_by_xpath('//*[@id="header-secondary"]/ul/li3/div/button/span2') prifileOut.click() time.sleep(1) driver.find_element_by_xpath('//*[@id="header-secondary"]/ul/li3/div/ul/li5') #li logout eXXit = driver.find_element_by_xpath('//*[@id="header-secondary"]/ul/li3/div/ul/li5') eXXit.click() continue #SOLO A SCOPO ILLUSTRATIVO EDUCATIVO E BLA BLA BLA! ERRORE C:\Users\qwertPycharmProjects\pythonProject\venv\Scripts\python.exe C:\Users\qwertPycharmProjects\pythonProject\main.py Traceback (most recent call last): File "C:\Users\qwertPycharmProjects\pythonProject\main.py", line 5, in <module> driver = uc.Chrome() File "C:\Users\qwertPycharmProjects\pythonProject\venv\lib\site-packages\undetected_chromedriver\v2.py", line 193, in __init__ selenium.webdriver.chrome.webdriver.WebDriver.__init__( TypeError: __init__() got an unexpected keyword argument 'executable_path' Process finished with exit code 1 --- Ultima modifica di Alfaromeoista in data 2023-09-07 10:37:25 --- --- Ultima modifica di Alfaromeoista in data 2023-09-07 10:38:01 --- --- Ultima modifica di Alfaromeoista in data 2023-09-07 10:38:48 --- |
|
Scritto da Gulshan Negi |
2023-09-21 14:06:20 - Re: Pycharm bot scritto da me non funziona più
|
There are some logical isssues with your code, you can try below code to fix this error.
from selenium import webdriver import undetected_chromedriver.v2 as uc import time from random_username.generate import generate_username # Initialize the Chrome WebDriver with undetected_chromedriver driver = uc.Chrome() with drivers: driver.get('https://yarevival.flarum.cloud/') logo = ''' Author: @POPEYE EL POPE Version: 1.0 ######################################## DISCLAIMER ########## ################################ | Trolletto tool is a tool that allows you to use to bot some no sense accounts to the | | DUCE's site. Please use this tool responsibly. | | I am NOT responsible for any damages caused or any crimes committed by using this tool. | ###################################################### ############################################ ''' print(logo) x = 0 while x < 1: time.sleep(4) driver.find_element_by_class_name('item-signUp').click() time.sleep(1) userName = driver.find_element_by_name('username') name = generate_username(1) userName.send_keys(str(name0)) # Use name0 to get the string mailField = driver.find_element_by_name('email') mailField.click() mailField.send_keys(f"{name0}@ADMINBRUTTO.IT") passWord = driver.find_element_by_name('password') passWord.click() passWord.send_keys('arandomshittypasword') register = driver.find_element_by_xpath('//*[@id="modal"]/div/div/div/form/div2/div2/div5/button') register.click() time.sleep(3) prifileOut = driver.find_element_by_xpath('//*[@id="header-secondary"]/ul/li3/div/button/span2') prifileOut.click() time.sleep(1) eXXit = driver.find_element_by_xpath('//*[@id="header-secondary"]/ul/li3/div/ul/li5') eXXit.click() # FOR EDUCATIONAL ILLUSTRATIVE PURPOSES ONLY AND BLA BLA BLA! Thanks |
Pagina: 1
Esegui il login per scrivere una risposta.