Update main.py

back to main
This commit is contained in:
2025-10-13 09:50:23 +00:00
parent 76b26b3767
commit 42dae905b4

80
main.py
View File

@@ -1010,6 +1010,7 @@ class ea_fucking():
except: except:
pass pass
#import pdb;pdb.set_trace()
sleep(6) sleep(6)
pyautogui.press('tab')#, pyautogui.press('tab')#,
sleep(1) sleep(1)
@@ -1326,7 +1327,7 @@ class ea_fucking():
codex.end() codex.end()
codex=Gmail(value,val2,browser_proxy=browser_proxy) codex=Gmail(value,val2,browser_proxy=browser_proxy)
print('eror') print('eror')
# #import pdb;pdb.set_trace()
print('break_one') print('break_one')
if codes==True: if codes==True:
pass pass
@@ -1572,7 +1573,7 @@ class ea_fucking():
codex.end() codex.end()
codex=Gmail(value,val2,browser_proxy=browser_proxy) codex=Gmail(value,val2,browser_proxy=browser_proxy)
print('eror') print('eror')
# #import pdb;pdb.set_trace()
if codes==True: if codes==True:
pass pass
@@ -1830,7 +1831,7 @@ class ea_fucking():
tot=self.qr_code() tot=self.qr_code()
sleep(3) sleep(3)
totx=self.top(tot) totx=self.top(tot)
# #import pdb;pdb.set_trace()
# ea_png/input_bouten1.PNG ea_png/input_bouten2.PNG ea_png/input_for_end.PNG # ea_png/input_bouten1.PNG ea_png/input_bouten2.PNG ea_png/input_for_end.PNG
if chek5==True: if chek5==True:
pass pass
@@ -2005,9 +2006,8 @@ class ea_fucking():
class Gmail: class Gmail:
def __init__(self, name, pasword, browser_proxy,back___mail=''): def __init__(self, name, pasword, browser_proxy):
self.flag_exit = None self.flag_exit = None
self.back___mail = back___mail
self.name = name self.name = name
self.pasword = pasword self.pasword = pasword
@@ -2175,29 +2175,6 @@ class Gmail:
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}verify.png")) self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}verify.png"))
return 'robot' return 'robot'
''' '''
#
xxn=self.driver.find_elements(By.XPATH, "//*[contains(text(), 'Confirm your recovery email')]")
try:
xxn.click()
except:
pass
for i in xxn:
try:
i.click()
except:
pass
try:
elem = self.driver.execute_script("return document.activeElement")
except:
elem = self.driver.execute_script("return document.activeElement")
elem.send_keys(self.back___mail)
elem.send_keys(Keys.ENTER)
sleep(20)
self.driver.get('https://mail.google.com/mail/u/0/#inbox')
sleep(5)
if 'Wrong password. Try again or click Forgot password to reset it.' in self.driver.page_source: if 'Wrong password. Try again or click Forgot password to reset it.' in self.driver.page_source:
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}_pasword_eror.png")) self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}_pasword_eror.png"))
return 'pas_eror' return 'pas_eror'
@@ -2326,7 +2303,7 @@ class Gmail:
return code return code
print(elements) print(elements)
# #import pdb;pdb.set_trace()
for i in elements: for i in elements:
print(i.text) print(i.text)
data=i.text.replace('Your EA Security Code is: ', '') data=i.text.replace('Your EA Security Code is: ', '')
@@ -2437,7 +2414,7 @@ class Gmail:
self.driver.get("https://mail.google.com/mail/u/0/#settings/general") self.driver.get("https://mail.google.com/mail/u/0/#settings/general")
sleep(10) sleep(10)
# #import pdb;pdb.set_trace()
#iframes = self.driver.find_elements(By.TAG_NAME, "iframe") #iframes = self.driver.find_elements(By.TAG_NAME, "iframe")
xx=self.driver.find_element(By.XPATH, "//select") xx=self.driver.find_element(By.XPATH, "//select")
sleep(5) sleep(5)
@@ -2447,7 +2424,7 @@ class Gmail:
xx=self.driver.find_element(By.XPATH, "//td/div/button").click() xx=self.driver.find_element(By.XPATH, "//td/div/button").click()
sleep(3) sleep(3)
self.driver.get("https://myaccount.google.com/language") self.driver.get("https://myaccount.google.com/language")
# #import pdb;pdb.set_trace()
#https://myaccount.google.com/language #https://myaccount.google.com/language
xd='' xd=''
for i in range(8): for i in range(8):
@@ -2605,7 +2582,7 @@ def main(path_png_file,
return 'ALERT_to_mnay_code_chek' return 'ALERT_to_mnay_code_chek'
print('----------//////////',get_turn_on_2) print('----------//////////',get_turn_on_2)
# #import pdb;pdb.set_trace()
if 'ea_created__app_code_nead!!' in str(get_turn_on_2): if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
return "ea_created__app_code_nead!!" return "ea_created__app_code_nead!!"
if isinstance(get_turn_on_2, str):return get_turn_on_2 if isinstance(get_turn_on_2, str):return get_turn_on_2
@@ -2631,7 +2608,7 @@ def main(path_png_file,
print('handel_page_and_code Failed!') print('handel_page_and_code Failed!')
return 'handel_page_and_code Failed' return 'handel_page_and_code Failed'
###########################################^^^^ ###########################################^^^^
# #import pdb;pdb.set_trace()
return handel_page_and_code return handel_page_and_code
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ -2650,7 +2627,7 @@ def main(path_png_file,
if not contuen_page2: if not contuen_page2:
print('contuen_page2 Failed!') print('contuen_page2 Failed!')
return 'contuen_page2 Failed' return 'contuen_page2 Failed'
# # import pdb;pdb.set_trace()
# Accept buttons # Accept buttons
next = ea.next() next = ea.next()
if isinstance(next, str):return next if isinstance(next, str):return next
@@ -2664,7 +2641,7 @@ def main(path_png_file,
print('accept >>>', accept) print('accept >>>', accept)
if 'make_other_time'==accept: if 'make_other_time'==accept:
# #import pdb;pdb.set_trace()
#return 'make_other_time' #return 'make_other_time'
sleep(10) sleep(10)
get_seting_sec_1 = ea.get_seting_sec_1() get_seting_sec_1 = ea.get_seting_sec_1()
@@ -2678,7 +2655,7 @@ def main(path_png_file,
if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2): if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2):
return 'ALERT_to_mnay_code_chek' return 'ALERT_to_mnay_code_chek'
print('----------//////////',get_turn_on_2) print('----------//////////',get_turn_on_2)
# #import pdb;pdb.set_trace()
if 'ea_created__app_code_nead!!' in str(get_turn_on_2): if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
return "ea_created__app_code_nead!!" return "ea_created__app_code_nead!!"
if isinstance(get_turn_on_2, str):return get_turn_on_2 if isinstance(get_turn_on_2, str):return get_turn_on_2
@@ -2703,7 +2680,7 @@ def main(path_png_file,
print('handel_page_and_code Failed!') print('handel_page_and_code Failed!')
return 'handel_page_and_code Failed' return 'handel_page_and_code Failed'
###########################################^^^^ ###########################################^^^^
# #import pdb;pdb.set_trace()
return handel_page_and_code return handel_page_and_code
if not accept: if not accept:
print('accept Failed!') print('accept Failed!')
@@ -2725,7 +2702,7 @@ def main(path_png_file,
get_turn_on_2 = ea.get_turn_on_2(codex,value,val2) get_turn_on_2 = ea.get_turn_on_2(codex,value,val2)
if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2): if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2):
return 'ALERT_to_mnay_code_chek' return 'ALERT_to_mnay_code_chek'
# #import pdb;pdb.set_trace()
if 'ea_created__app_code_nead!!' in str(get_turn_on_2): if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
return "ea_created__app_code_nead!!" return "ea_created__app_code_nead!!"
if isinstance(get_turn_on_2, str):return get_turn_on_2 if isinstance(get_turn_on_2, str):return get_turn_on_2
@@ -2751,7 +2728,7 @@ def main(path_png_file,
print('handel_page_and_code Failed!') print('handel_page_and_code Failed!')
return 'handel_page_and_code Failed' return 'handel_page_and_code Failed'
###########################################^^^^ ###########################################^^^^
# #import pdb;pdb.set_trace()
return handel_page_and_code return handel_page_and_code
print('creat >>>', creat) print('creat >>>', creat)
if isinstance(creat, str):return creat if isinstance(creat, str):return creat
@@ -2777,7 +2754,7 @@ def main(path_png_file,
get_turn_on_2 = ea.get_turn_on_2(codex,value,val2) get_turn_on_2 = ea.get_turn_on_2(codex,value,val2)
if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2): if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2):
return 'ALERT_to_mnay_code_chek' return 'ALERT_to_mnay_code_chek'
# # import pdb;pdb.set_trace()
if 'ea_created__app_code_nead!!' in str(get_turn_on_2): if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
return "ea_created__app_code_nead!!" return "ea_created__app_code_nead!!"
if isinstance(get_turn_on_2, str):return get_turn_on_2 if isinstance(get_turn_on_2, str):return get_turn_on_2
@@ -2820,9 +2797,9 @@ def main(path_png_file,
print('accept >>>', accept) print('accept >>>', accept)
if 'make_other_time'==accept: if 'make_other_time'==accept:
# #import pdb;pdb.set_trace()
#return 'make_other_time' #return 'make_other_time'
# #import pdb;pdb.set_trace()
#return 'make_other_time' #return 'make_other_time'
sleep(10) sleep(10)
get_seting_sec_1 = ea.get_seting_sec_1() get_seting_sec_1 = ea.get_seting_sec_1()
@@ -2836,7 +2813,7 @@ def main(path_png_file,
if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2): if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2):
return 'ALERT_to_mnay_code_chek' return 'ALERT_to_mnay_code_chek'
print('----------//////////',get_turn_on_2) print('----------//////////',get_turn_on_2)
# #import pdb;pdb.set_trace()
if 'ea_created__app_code_nead!!' in str(get_turn_on_2): if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
return "ea_created__app_code_nead!!" return "ea_created__app_code_nead!!"
if isinstance(get_turn_on_2, str):return get_turn_on_2 if isinstance(get_turn_on_2, str):return get_turn_on_2
@@ -2862,7 +2839,7 @@ def main(path_png_file,
print('handel_page_and_code Failed!') print('handel_page_and_code Failed!')
return 'handel_page_and_code Failed' return 'handel_page_and_code Failed'
###########################################^^^^ ###########################################^^^^
# #import pdb;pdb.set_trace()
return handel_page_and_code return handel_page_and_code
if not accept: if not accept:
print('accept Failed!') print('accept Failed!')
@@ -2884,7 +2861,7 @@ def main(path_png_file,
get_turn_on_2 = ea.get_turn_on_2(codex,value,val2) get_turn_on_2 = ea.get_turn_on_2(codex,value,val2)
if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2): if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2):
return 'ALERT_to_mnay_code_chek' return 'ALERT_to_mnay_code_chek'
# #import pdb;pdb.set_trace()
if 'ea_created__app_code_nead!!' in str(get_turn_on_2): if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
return "ea_created__app_code_nead!!" return "ea_created__app_code_nead!!"
if isinstance(get_turn_on_2, str):return get_turn_on_2 if isinstance(get_turn_on_2, str):return get_turn_on_2
@@ -2938,7 +2915,7 @@ def main(path_png_file,
if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2): if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2):
return 'ALERT_to_mnay_code_chek' return 'ALERT_to_mnay_code_chek'
print('----------//////////',get_turn_on_2) print('----------//////////',get_turn_on_2)
# # import pdb;pdb.set_trace()
if 'ea_created__app_code_nead!!' in str(get_turn_on_2): if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
return "ea_created__app_code_nead!!" return "ea_created__app_code_nead!!"
if isinstance(get_turn_on_2, str):return get_turn_on_2 if isinstance(get_turn_on_2, str):return get_turn_on_2
@@ -2964,7 +2941,7 @@ def main(path_png_file,
print('handel_page_and_code Failed!') print('handel_page_and_code Failed!')
return 'handel_page_and_code Failed' return 'handel_page_and_code Failed'
###########################################^^^^ ###########################################^^^^
#import pdb;pdb.set_trace()
return handel_page_and_code return handel_page_and_code
# Open new tab # Open new tab
###################################### ######################################
@@ -3179,7 +3156,6 @@ def delete_if_low_disk_space(path_to_check, folder_to_delete, threshold_gb=10):
if __name__ == "__main__": if __name__ == "__main__":
conter_port=0 conter_port=0
@@ -3195,7 +3171,7 @@ if __name__ == "__main__":
print(db_config) print(db_config)
manager = EmailGroupManager(db_config) manager = EmailGroupManager(db_config)
group_data=[]#{'id': 15683, 'email': 'td621003@gmail.com', 'email_password': 'uGs9UhAmZ3', 'back_up_mail': 'vodungf24uq@disbox.org', 'seler_name': 'atefe_2', 'group_id': 128}] group_data=[]
while True: while True:
try: try:
@@ -3216,7 +3192,6 @@ if __name__ == "__main__":
"id": ig[0], "id": ig[0],
"email": ig[1], "email": ig[1],
"email_password": ig[-3], "email_password": ig[-3],
"back_up_mail":ig[-4],
}) })
print(group_data) print(group_data)
print(len(group_data)) print(len(group_data))
@@ -3235,7 +3210,6 @@ if __name__ == "__main__":
#df = pd.read_excel(os.path.join(path_file, ixs), engine='openpyxl') #df = pd.read_excel(os.path.join(path_file, ixs), engine='openpyxl')
print(ixs) print(ixs)
# {'id': 4, 'email': 'sunnmp97667@gmail.com', 'email_password': 'Exgvufc6Rxtf'} # {'id': 4, 'email': 'sunnmp97667@gmail.com', 'email_password': 'Exgvufc6Rxtf'}
back_up_mail=ixs['back_up_mail']
value=ixs['email'] value=ixs['email']
val2=ixs['email_password'] val2=ixs['email_password']
id_mail=ixs['id'] id_mail=ixs['id']
@@ -3298,7 +3272,7 @@ if __name__ == "__main__":
os.system("taskkill /f /im uc_driver.exe") os.system("taskkill /f /im uc_driver.exe")
os.system("taskkill /f /im chromedriver.exe") os.system("taskkill /f /im chromedriver.exe")
codexs=Gmail(value,val2,browser_proxy=browser_proxy,back___mail=back_up_mail) codexs=Gmail(value,val2,browser_proxy=browser_proxy)
try: try:
@@ -3307,7 +3281,7 @@ if __name__ == "__main__":
if codexs.flag_exit==True: if codexs.flag_exit==True:
codexs.flag_exit=None codexs.flag_exit=None
codexs.end() codexs.end()
codexs=Gmail(value,val2,browser_proxy=browser_proxy,back___mail=back_up_mail) codexs=Gmail(value,val2,browser_proxy=browser_proxy)
check_cookiesx=str(codexs.check_cookies()) check_cookiesx=str(codexs.check_cookies())
if 'pas_eror' in check_cookiesx: if 'pas_eror' in check_cookiesx: