Answer the question
In order to leave comments, you need to log in
How to make it so that would take data from a file?
How to make it so that it would take data from a txt file and log in to the site so infinitely
all data in the form
name:password
name:password
name:password
name:password
from selenium import webdriver
from selenium.webdriver.common.by import By
name = 'ИМЯ ИЗ TXT'
password = 'ПАРОЛЬ ИЗ TXT'
url = 'http://mrush.mobi/'
driver = webdriver.Chrome('C:/Users/root/Desktop/mrush/chromedriver')
driver.get(url)
#Авторизация
driver.find_element_by_css_selector("input[name='name']").send_keys(name)
driver.find_element_by_css_selector("input[name='password']").send_keys(password)
checkboxes = driver.find_elements(By.XPATH, '//input[@type="checkbox"]')
for box in checkboxes:
try:
box.click()
except Exception:
pass
driver.find_element_by_css_selector("input[type='submit']").click()
#Начинает игру
new = driver.get("http://mrush.mobi/first_attack?attack=1");
#Выход из аккаунта
logout = driver.get("http://mrush.mobi/logout");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question