保存文件时出现问题 完成后,告诉我它已完成,然后查看 LIVE.txt 文件 我发现它是空的,即使它告诉我它已保存..
from selenium import webdriver
import time
live = open('LIVE.txt', 'w')
die = open('DIE.txt', 'w')
list = input("Input Mail List :")
while True:
driver = webdriver.Chrome()
driver.maximize_window()
list = open(list, 'r').readlines()
for line in list:
email = line.strip()
driver.get("https://www.etsy.com/forgot_password?email=")
checkemail = driver.find_element_by_xpath('//*[@id="content"]/div/div/div/div[2]/form/div/input[1]')
checkemail.send_keys(list)
loginButton = driver.find_elements_by_css_selector("#submit-button")
loginButton[0].click()
emailcheck = driver.find_element_by_xpath('//*[@id="content"]/div/div/div/div[1]')
if emailcheck == driver.find_element_by_xpath('//*[@id="content"]/div/div/div/div[1]') :
print("\033[32;1mLIVE\033[0m | " + email + " | [(Checked)]")
live.write(email + '\n')
else:
print("\033[31;1mDIE\033[0m | " + email + " | [(Checked)]")
die.write(email + '\n')