Update main.py
back to main
This commit is contained in:
80
main.py
80
main.py
@@ -1010,6 +1010,7 @@ class ea_fucking():
|
||||
except:
|
||||
pass
|
||||
|
||||
#import pdb;pdb.set_trace()
|
||||
sleep(6)
|
||||
pyautogui.press('tab')#,
|
||||
sleep(1)
|
||||
@@ -1326,7 +1327,7 @@ class ea_fucking():
|
||||
codex.end()
|
||||
codex=Gmail(value,val2,browser_proxy=browser_proxy)
|
||||
print('eror')
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
print('break_one')
|
||||
if codes==True:
|
||||
pass
|
||||
@@ -1572,7 +1573,7 @@ class ea_fucking():
|
||||
codex.end()
|
||||
codex=Gmail(value,val2,browser_proxy=browser_proxy)
|
||||
print('eror')
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
|
||||
if codes==True:
|
||||
pass
|
||||
@@ -1830,7 +1831,7 @@ class ea_fucking():
|
||||
tot=self.qr_code()
|
||||
sleep(3)
|
||||
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
|
||||
if chek5==True:
|
||||
pass
|
||||
@@ -2005,9 +2006,8 @@ class ea_fucking():
|
||||
|
||||
|
||||
class Gmail:
|
||||
def __init__(self, name, pasword, browser_proxy,back___mail=''):
|
||||
def __init__(self, name, pasword, browser_proxy):
|
||||
self.flag_exit = None
|
||||
self.back___mail = back___mail
|
||||
self.name = name
|
||||
self.pasword = pasword
|
||||
|
||||
@@ -2175,29 +2175,6 @@ class Gmail:
|
||||
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}verify.png"))
|
||||
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:
|
||||
self.driver.save_screenshot(os.path.join(os.getcwd(),'picher',f"_{self.name}_pasword_eror.png"))
|
||||
return 'pas_eror'
|
||||
@@ -2326,7 +2303,7 @@ class Gmail:
|
||||
return code
|
||||
|
||||
print(elements)
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
for i in elements:
|
||||
print(i.text)
|
||||
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")
|
||||
sleep(10)
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
#iframes = self.driver.find_elements(By.TAG_NAME, "iframe")
|
||||
xx=self.driver.find_element(By.XPATH, "//select")
|
||||
sleep(5)
|
||||
@@ -2447,7 +2424,7 @@ class Gmail:
|
||||
xx=self.driver.find_element(By.XPATH, "//td/div/button").click()
|
||||
sleep(3)
|
||||
self.driver.get("https://myaccount.google.com/language")
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
#https://myaccount.google.com/language
|
||||
xd=''
|
||||
for i in range(8):
|
||||
@@ -2605,7 +2582,7 @@ def main(path_png_file,
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
|
||||
print('----------//////////',get_turn_on_2)
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
|
||||
return "ea_created__app_code_nead!!"
|
||||
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!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
@@ -2650,7 +2627,7 @@ def main(path_png_file,
|
||||
if not contuen_page2:
|
||||
print('contuen_page2 Failed!')
|
||||
return 'contuen_page2 Failed'
|
||||
#
|
||||
# import pdb;pdb.set_trace()
|
||||
# Accept buttons
|
||||
next = ea.next()
|
||||
if isinstance(next, str):return next
|
||||
@@ -2664,7 +2641,7 @@ def main(path_png_file,
|
||||
|
||||
print('accept >>>', accept)
|
||||
if 'make_other_time'==accept:
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
#return 'make_other_time'
|
||||
sleep(10)
|
||||
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):
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
print('----------//////////',get_turn_on_2)
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
|
||||
return "ea_created__app_code_nead!!"
|
||||
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!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
if not accept:
|
||||
print('accept Failed!')
|
||||
@@ -2725,7 +2702,7 @@ def main(path_png_file,
|
||||
get_turn_on_2 = ea.get_turn_on_2(codex,value,val2)
|
||||
if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2):
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
|
||||
return "ea_created__app_code_nead!!"
|
||||
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!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
print('creat >>>', 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)
|
||||
if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2):
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
#
|
||||
# import pdb;pdb.set_trace()
|
||||
if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
|
||||
return "ea_created__app_code_nead!!"
|
||||
if isinstance(get_turn_on_2, str):return get_turn_on_2
|
||||
@@ -2820,9 +2797,9 @@ def main(path_png_file,
|
||||
print('accept >>>', accept)
|
||||
|
||||
if 'make_other_time'==accept:
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
#return 'make_other_time'
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
#return 'make_other_time'
|
||||
sleep(10)
|
||||
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):
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
print('----------//////////',get_turn_on_2)
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
|
||||
return "ea_created__app_code_nead!!"
|
||||
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!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
if not accept:
|
||||
print('accept Failed!')
|
||||
@@ -2884,7 +2861,7 @@ def main(path_png_file,
|
||||
get_turn_on_2 = ea.get_turn_on_2(codex,value,val2)
|
||||
if 'ALERT_to_mnay_code_chek' in str(get_turn_on_2):
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
#
|
||||
#import pdb;pdb.set_trace()
|
||||
if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
|
||||
return "ea_created__app_code_nead!!"
|
||||
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):
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
print('----------//////////',get_turn_on_2)
|
||||
#
|
||||
# import pdb;pdb.set_trace()
|
||||
if 'ea_created__app_code_nead!!' in str(get_turn_on_2):
|
||||
return "ea_created__app_code_nead!!"
|
||||
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!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
|
||||
#import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
# 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__":
|
||||
|
||||
conter_port=0
|
||||
@@ -3195,7 +3171,7 @@ if __name__ == "__main__":
|
||||
print(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:
|
||||
try:
|
||||
@@ -3216,7 +3192,6 @@ if __name__ == "__main__":
|
||||
"id": ig[0],
|
||||
"email": ig[1],
|
||||
"email_password": ig[-3],
|
||||
"back_up_mail":ig[-4],
|
||||
})
|
||||
print(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')
|
||||
print(ixs)
|
||||
# {'id': 4, 'email': 'sunnmp97667@gmail.com', 'email_password': 'Exgvufc6Rxtf'}
|
||||
back_up_mail=ixs['back_up_mail']
|
||||
value=ixs['email']
|
||||
val2=ixs['email_password']
|
||||
id_mail=ixs['id']
|
||||
@@ -3298,7 +3272,7 @@ if __name__ == "__main__":
|
||||
os.system("taskkill /f /im uc_driver.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:
|
||||
@@ -3307,7 +3281,7 @@ if __name__ == "__main__":
|
||||
if codexs.flag_exit==True:
|
||||
codexs.flag_exit=None
|
||||
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())
|
||||
|
||||
if 'pas_eror' in check_cookiesx:
|
||||
|
Reference in New Issue
Block a user