Advertisement
xmd79

trx

Feb 5th, 2023 (edited)
1,589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.88 KB | None | 0 0
  1. from selenium import webdriver
  2. from selenium.webdriver.common.keys import Keys
  3. from selenium.webdriver.common.by import By
  4. from selenium.webdriver.support.ui import WebDriverWait
  5. from selenium.webdriver.support import expected_conditions as EC
  6. from selenium.common.exceptions import TimeoutException
  7. import time
  8.  
  9. with open("wallets.txt", 'r', encoding='UTF-8') as file:
  10.     while (line := file.readline().rstrip()):
  11.         print(line)
  12.         try:
  13.             base_url = "https://tronxminer.com/"    
  14.             start_url = "https://tronxminer.com/"
  15.             my_xpath = '//*[@id="home"]/div[2]/div/div[2]/a'
  16.             driver = webdriver.Firefox()
  17.             driver.get(start_url)  
  18.             wait = WebDriverWait(driver, 10)
  19.             element = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath))).click()
  20.             my_xpath2 = '//*[@id="wallet"]'
  21.             time.sleep(3)
  22.             element2 = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath2))).send_keys(line)
  23.             my_xpath3 = '//*[@id="startBtn"]'
  24.             time.sleep(3)
  25.             element3 = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath3))).click()
  26.             time.sleep(2)
  27.             my_xpath4 = '//*[@class="btn btn-danger"]'
  28.             element4 = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath4))).click()
  29.             time.sleep(2)
  30.             my_xpath5 = '//*[@href="#reinvestMin"]'
  31.             element5 = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath5))).click()
  32.             time.sleep(2)
  33.             my_xpath6 = '//*[@id="startBtn"]'
  34.             element6 = wait.until(EC.element_to_be_clickable((By.XPATH, my_xpath6))).click()
  35.             time.sleep(2)
  36.             driver.close()
  37.         except TimeoutException as ex:
  38.             isrunning = 0
  39.             print("Exception has been thrown. " + str(ex))
  40.             driver.close()
  41.  
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement