Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- from selenium.webdriver.common.keys import Keys
- from selenium.webdriver.common.by import By
- from selenium.webdriver.support.ui import WebDriverWait
- from selenium.webdriver.support import expected_conditions as EC
- from selenium.common.exceptions import TimeoutException
- import time
- with open("wallets.txt", 'r', encoding='UTF-8') as file:
- while (line := file.readline().rstrip()):
- print(line)
- try:
- base_url = "https://tronxminer.com/"
- start_url = "https://tronxminer.com/"
- my_xpath = '//*[@id="home"]/div[2]/div/div[2]/a'
- driver = webdriver.Firefox()
- driver.get(start_url)
- wait = WebDriverWait(driver, 10)
- element = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath))).click()
- my_xpath2 = '//*[@id="wallet"]'
- time.sleep(3)
- element2 = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath2))).send_keys(line)
- my_xpath3 = '//*[@id="startBtn"]'
- time.sleep(3)
- element3 = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath3))).click()
- time.sleep(2)
- my_xpath4 = '//*[@class="btn btn-danger"]'
- element4 = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath4))).click()
- time.sleep(2)
- my_xpath5 = '//*[@href="#reinvestMin"]'
- element5 = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath5))).click()
- time.sleep(2)
- my_xpath6 = '//*[@id="startBtn"]'
- element6 = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath6))).click()
- time.sleep(2)
- driver.close()
- except TimeoutException as ex:
- isrunning = 0
- print("Exception has been thrown. " + str(ex))
- driver.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement