Code for aizaword

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.9 kB
3
Indexable
Never
import undetected_chromedriver as uc
from selenium.webdriver.common.by import By
import selenium
import multiprocessing
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import time
from selenium.webdriver.common.keys import Keys
import selenium
vi=open("Info/vi.txt","r").read().split("\n")
from selenium.common.exceptions import *
# option = uc.ChromeOptions()
# option.add_argument('user-data-dir:E:\\Python\\Selenium\\Profile')
# driver1 = uc.Chrome(browser_executable_path="chromedriver.exe",use_subprocess=True,options=option)
# driver1 = uc.Chrome(use_subprocess=True,options=a,executable_path="chromedriver.exe")
# driver1 = uc.Chrome(driver_executable_path=r"E:\Python\Selenium\chromedriver1.exe",use_subprocess=True, user_data_dir='E:\\Imp\\Portable\\01\\Data\\profile')
for index in range(0,1):
    driver1 = uc.Chrome(driver_executable_path=r"E:\Python\Selenium\chromedriver1.exe",use_subprocess=True)
    # url = driver1.get("https://twitter.com/home")
    url = driver1.get("https://woobox.com/pnxxtw?fbclid=IwAR2RI5IhTO9oMatktNRItMXvCwF3fPDqnKD4zr3euMSdCPPGJbcLPdn-I7E")
    a = True
    time.sleep(3)
    # element1 = driver1.find_element_by_xpath('//*[@id="app-mount"]/div[2]/div/div/div/section/div/button')
    # time.sleep(2)
    # element1.click()
    while(a):
        try:
            element1 = driver1.find_element_by_xpath('//*[@id="quiz"]/div[2]/button[3]')
            time.sleep(2)
            if(element1 != None):
                a = False
                element1.click()
        except selenium.common.exceptions.NoSuchElementException:
            pass
    # url = driver1.get("https://discord.com/channels/@me")
    elemen = driver1.find_element_by_xpath('//*[@id="quiz"]/div[4]/button[2]')
    time.sleep(2)
    elemen.click()

    elemen = driver1.find_element_by_xpath('//*[@id="quiz"]/div[6]/button[3]')
    time.sleep(2)
    elemen.click()

    elemen = driver1.find_element_by_xpath('//*[@id="quiz"]/div[8]/button[3]')
    time.sleep(2)
    elemen.click()

    elemen = driver1.find_element_by_xpath('//*[@id="quiz"]/div[10]/button[4]')
    time.sleep(2)
    elemen.click()


    elemen = driver1.find_element_by_xpath('//*[@id="quiz"]/div[12]/button[3]')
    time.sleep(2)
    elemen.click()


    elemen = driver1.find_element_by_xpath('//*[@id="quiz"]/div[14]/button[1]')
    time.sleep(2)
    elemen.click()

    elemen = driver1.find_element_by_xpath('//*[@id="quiz"]/div[16]/button[3]')
    time.sleep(2)
    elemen.click()


    elemen = driver1.find_element_by_xpath('//*[@id="address_wallet_id"]')
    time.sleep(2)
    elemen.send_keys(vi[index])

    elemen = driver1.find_element_by_xpath('//*[@id="actionbutton"]')
    time.sleep(2)
    elemen.click()

    time.sleep(40)
    driver1.quit()



# a = input("aaa")