Update main.py
sss
This commit is contained in:
285
main.py
285
main.py
@@ -1,4 +1,3 @@
|
||||
|
||||
import pyautogui,os,time,subprocess,random,pyotp,re,pyperclip
|
||||
import cv2##
|
||||
import numpy as np
|
||||
@@ -584,7 +583,7 @@ class pool():
|
||||
break
|
||||
except Exception as e:
|
||||
print(e)
|
||||
pass
|
||||
passf
|
||||
for i in response:
|
||||
if 'ms' in i['pingLatency']:
|
||||
while True:
|
||||
@@ -825,7 +824,7 @@ class ea_fucking():
|
||||
time.sleep(4)
|
||||
for i in range(5):
|
||||
print(os.path.join(self.path_png_file,r'1_dcuk_clik.PNG'))
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
try:
|
||||
try:
|
||||
|
||||
@@ -854,7 +853,7 @@ class ea_fucking():
|
||||
print(e)
|
||||
time.sleep(5)
|
||||
continue
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
if location:
|
||||
pyautogui.click(pyautogui.center(location))
|
||||
|
||||
@@ -1157,10 +1156,10 @@ class ea_fucking():
|
||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'fucking_per.PNG'), confidence=0.8)
|
||||
if location:
|
||||
print('pERSIAN MODDDDDDDDDDDDDDDD !!!!!!!!!!! ')
|
||||
###import pdb;pdb.set_trace()
|
||||
####import pdb;pdb.set_trace()
|
||||
except:
|
||||
pass
|
||||
###import pdb;pdb.set_trace()
|
||||
####import pdb;pdb.set_trace()
|
||||
try:
|
||||
print('start chek')
|
||||
location = pyautogui.locateOnScreen(os.path.join(self.path_png_file,r'fucking_per_2.PNG'), confidence=0.8)
|
||||
@@ -1237,10 +1236,10 @@ class ea_fucking():
|
||||
return True
|
||||
except:
|
||||
print('notfund contniue contniue contniue')
|
||||
###import pdb;pdb.set_trace()
|
||||
####import pdb;pdb.set_trace()
|
||||
except:
|
||||
pass '''
|
||||
#import pdb;pdb.set_trace()
|
||||
##import pdb;pdb.set_trace()
|
||||
sleep(6)
|
||||
pyautogui.press('tab')#,
|
||||
sleep(1)
|
||||
@@ -1558,7 +1557,7 @@ class ea_fucking():
|
||||
codex.end()
|
||||
codex=Gmail(value,val2,browser_proxy=browser_proxy)
|
||||
print('eror')
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
print('break_one')
|
||||
if codes==True:
|
||||
pass
|
||||
@@ -1809,7 +1808,7 @@ class ea_fucking():
|
||||
codex.end()
|
||||
codex=Gmail(value,val2,browser_proxy=browser_proxy)
|
||||
print('eror')
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
return 'fail_get_code'
|
||||
|
||||
|
||||
@@ -2472,11 +2471,20 @@ class Gmail:
|
||||
if self.flag==True:
|
||||
print('ineeeeeeeeeeeeeeee',self.flag)
|
||||
user=self.send_username(name)
|
||||
print('user sendddddd >>>>>',user)
|
||||
#import pdb;pdb.set_trace()
|
||||
if user=='Kill':
|
||||
print('Kill')
|
||||
self.flag_user=user
|
||||
self.flag_user_sg='Kill'
|
||||
if user==True:
|
||||
time.sleep(8)
|
||||
self.send_pasword(password)
|
||||
time.sleep(9)
|
||||
print('changelanggggggggggggggggggggggggg',self.change_lang())
|
||||
#import pdb;pdb.set_trace()
|
||||
change_lang=self.change_lang()
|
||||
|
||||
print('changelanggggggggggggggggggggggggg',change_lang)
|
||||
else:
|
||||
self.flag_user=False
|
||||
self.flag_user_sg=user
|
||||
@@ -2557,7 +2565,7 @@ class Gmail:
|
||||
"""این تابع تمام بررسیهای خطای متنی و مبتنی بر عنصر کد اصلی را پوشش میدهد."""
|
||||
sleep(10)
|
||||
page_content = self.page.content()
|
||||
###import pdb;pdb.set_trace()
|
||||
####import pdb;pdb.set_trace()
|
||||
if "Verify" in page_content or "Confirm you’re not a robot" in page_content:
|
||||
self.page.screenshot(path=self.picher_dir / f"_{self.name}verify.png")
|
||||
return 'robot'
|
||||
@@ -2659,7 +2667,7 @@ class Gmail:
|
||||
|
||||
def send_username(self, user):
|
||||
try:
|
||||
# ####import pdb;pdb.set_trace()
|
||||
# #####import pdb;pdb.set_trace()
|
||||
self.page.goto("https://accounts.google.com/servicelogin?service=mail", wait_until="networkidle")
|
||||
time.sleep(1)
|
||||
email_input = self.page.locator("input[type='email'], input[type='text']").first
|
||||
@@ -2706,92 +2714,107 @@ class Gmail:
|
||||
print(f"[ERROR] Could not send password: {e}")
|
||||
return 'Kill'
|
||||
|
||||
|
||||
def change_lang(self):
|
||||
def change_lang_one(self):
|
||||
self.page.goto("https://mail.google.com/mail/u/0/#settings/general", wait_until="domcontentloaded")
|
||||
sleep(10)
|
||||
try:
|
||||
self.page.goto("https://mail.google.com/mail/u/0/#settings/general")
|
||||
time.sleep(10)
|
||||
|
||||
|
||||
lang_select = self.page.get_by_role("cell", name="Gmail display language:").get_by_role("combobox")
|
||||
lang_select.select_option(label="English (US)")
|
||||
try:
|
||||
|
||||
|
||||
self.page.get_by_role("button", name="Save Changes").click()
|
||||
except:
|
||||
pass
|
||||
self.page.get_by_role("button", name="Save Changes").click()
|
||||
return True
|
||||
except:
|
||||
pass
|
||||
time.sleep(3)
|
||||
try:
|
||||
lang_select = self.page.locator("(//div/b/following-sibling::select)[1]")
|
||||
lang_select.select_option("en")
|
||||
time.sleep(3)
|
||||
|
||||
#self.page.goto("https://myaccount.google.com/language")
|
||||
self.page.goto("https://myaccount.google.com/language", wait_until="domcontentloaded")
|
||||
time.sleep(5)
|
||||
|
||||
for i in range(8):
|
||||
buttons = self.page.locator("button, input[type='submit'], input[type='button']")
|
||||
count = buttons.count()
|
||||
if count >= 2:
|
||||
buttons.nth(count - 2).click()
|
||||
else:
|
||||
buttons.last.click()
|
||||
return True
|
||||
except:
|
||||
pass
|
||||
return True
|
||||
def change_lang(self):
|
||||
change_lang_one=self.change_lang_one()
|
||||
if change_lang_one==True:
|
||||
pass
|
||||
else:
|
||||
return 'change_lang_one False'
|
||||
#https://mail.google.com/mail/u/0/#settings/general
|
||||
|
||||
self.page.goto("https://myaccount.google.com/language", wait_until="domcontentloaded")
|
||||
|
||||
time.sleep(5)
|
||||
|
||||
for i in range(8):
|
||||
try:
|
||||
try:
|
||||
sfg = self.page.locator("xpath=//div/button/div")
|
||||
sfg.click()
|
||||
xd = True
|
||||
break
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
try:
|
||||
sfg = self.page.locator("xpath=//div/button/div")
|
||||
sfg = self.page.locator("xpath=/html/body/c-wiz/div/div[2]/div[2]/c-wiz/div[1]/div[4]/div/div[1]/ul/li/div/div[2]/div/button/div")
|
||||
sfg.click()
|
||||
xd = True
|
||||
break
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
try:
|
||||
sfg = self.page.locator("xpath=/html/body/c-wiz/div/div[2]/div[2]/c-wiz/div[1]/div[4]/div/div[1]/ul/li/div/div[2]/div/button/div")
|
||||
sfg.click()
|
||||
xd = True
|
||||
break
|
||||
|
||||
except:
|
||||
sfg = self.page.locator("xpath=/html/body/c-wiz/div/div[2]/div[2]/c-wiz/div[1]/div[4]/div/div[1]/ul/li/div/div[2]/div/span/button/div")
|
||||
sfg.click()
|
||||
xd = True
|
||||
break
|
||||
|
||||
except:
|
||||
sfg = self.page.locator("xpath=/html/body/c-wiz/div/div[2]/div[2]/c-wiz/div[1]/div[4]/div/div[1]/ul/li/div/div[2]/div/span/button/div")
|
||||
sfg.click()
|
||||
xd = True
|
||||
break
|
||||
except:
|
||||
pass
|
||||
# try:
|
||||
# self.page.locator('html').click()
|
||||
# self.page.locator('html').press('Tab')
|
||||
# active_element = self.page.locator(":focus")
|
||||
## active_element.click()
|
||||
# xd = True
|
||||
# break
|
||||
# except:
|
||||
# pass
|
||||
break
|
||||
|
||||
xd = True
|
||||
break
|
||||
except:
|
||||
self.page.reload()
|
||||
time.sleep(5)
|
||||
# فقط روی دکمه "Edit" تمرکز میکنیم و برایش صبر میکنیم
|
||||
|
||||
|
||||
|
||||
time.sleep(2)
|
||||
|
||||
# بقیه منطق شما که شکننده است ولی حفظ شده
|
||||
try:
|
||||
search_input = self.page.locator("input[aria-label*='Search']").first
|
||||
search_input.fill("English")
|
||||
search_input.press("ArrowDown")
|
||||
search_input.press("Enter")
|
||||
pass
|
||||
# try:
|
||||
# self.page.locator('html').click()
|
||||
# self.page.locator('html').press('Tab')
|
||||
# active_element = self.page.locator(":focus")
|
||||
## active_element.click()
|
||||
# xd = True
|
||||
# break
|
||||
# except:
|
||||
# pass
|
||||
except:
|
||||
active_element = self.page.locator(":focus")
|
||||
active_element.fill("English")
|
||||
active_element.press("ArrowDown")
|
||||
active_element.press("Enter")
|
||||
time.sleep(1)
|
||||
self.page.locator("//li[58]").first.click()
|
||||
self.page.locator("xpath=//div[3]/button/span[5]").click()
|
||||
|
||||
return True
|
||||
except Exception as e:
|
||||
print(f"[ERROR] Could not change language: {e}")
|
||||
# برای دیباگ کردن، یک اسکرینشات بگیر
|
||||
self.page.screenshot(path=self.picher_dir / f"_{self.name}_lang_error.png")
|
||||
return False
|
||||
self.page.reload()
|
||||
time.sleep(5)
|
||||
# فقط روی دکمه "Edit" تمرکز میکنیم و برایش صبر میکنیم
|
||||
|
||||
|
||||
|
||||
time.sleep(2)
|
||||
|
||||
# بقیه منطق شما که شکننده است ولی حفظ شده
|
||||
try:
|
||||
search_input = self.page.locator("input[aria-label*='Search']").first
|
||||
search_input.fill("English")
|
||||
search_input.press("ArrowDown")
|
||||
search_input.press("Enter")
|
||||
except:
|
||||
active_element = self.page.locator(":focus")
|
||||
active_element.fill("English")
|
||||
active_element.press("ArrowDown")
|
||||
active_element.press("Enter")
|
||||
time.sleep(1)
|
||||
self.page.locator("//li[58]").first.click()
|
||||
self.page.locator("xpath=//div[3]/button/span[5]").click()
|
||||
|
||||
return True
|
||||
# except Exception as e:
|
||||
# print(f"[ERROR] Could not change language: {e}")
|
||||
# self.page.screenshot(path=self.picher_dir / f"_{self.name}_lang_error.png")
|
||||
#return False
|
||||
def status(self):
|
||||
try:
|
||||
self.page.goto('https://mail.google.com/mail/u/0/#inbox', wait_until="networkidle")
|
||||
@@ -2922,7 +2945,7 @@ def main(path_png_file,
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
|
||||
print('----------//////////',get_turn_on_2)
|
||||
#####import pdb;pdb.set_trace()
|
||||
######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
|
||||
@@ -2939,9 +2962,9 @@ def main(path_png_file,
|
||||
print('ea.get_send_sec_3 Failed!')
|
||||
return 'ea.get_send_sec_3 Failed'
|
||||
sleep(10)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
handel_page_and_code = ea.handel_page_and_code(codex,value,val2)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
if 'ALERT_to_mnay_code_chek' in handel_page_and_code:
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
if isinstance(handel_page_and_code, str):return handel_page_and_code
|
||||
@@ -2950,7 +2973,7 @@ def main(path_png_file,
|
||||
print('handel_page_and_code Failed!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
@@ -2969,7 +2992,7 @@ def main(path_png_file,
|
||||
if not contuen_page2:
|
||||
print('contuen_page2 Failed!')
|
||||
return 'contuen_page2 Failed'
|
||||
# ####import pdb;pdb.set_trace()
|
||||
# #####import pdb;pdb.set_trace()
|
||||
# Accept buttons
|
||||
next = ea.next()
|
||||
if isinstance(next, str):return next
|
||||
@@ -2983,7 +3006,7 @@ def main(path_png_file,
|
||||
|
||||
print('accept >>>', accept)
|
||||
if 'make_other_time'==accept:
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
#return 'make_other_time'
|
||||
sleep(10)
|
||||
get_seting_sec_1 = ea.get_seting_sec_1()
|
||||
@@ -2997,7 +3020,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()
|
||||
######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
|
||||
@@ -3013,9 +3036,9 @@ def main(path_png_file,
|
||||
print('ea.get_send_sec_3 Failed!')
|
||||
return 'ea.get_send_sec_3 Failed'
|
||||
sleep(10)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
handel_page_and_code = ea.handel_page_and_code(codex,value,val2)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
if 'ALERT_to_mnay_code_chek' in handel_page_and_code:
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
if isinstance(handel_page_and_code, str):return handel_page_and_code
|
||||
@@ -3024,7 +3047,7 @@ def main(path_png_file,
|
||||
print('handel_page_and_code Failed!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
if not accept:
|
||||
print('accept Failed!')
|
||||
@@ -3046,7 +3069,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()
|
||||
######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
|
||||
@@ -3062,9 +3085,9 @@ def main(path_png_file,
|
||||
print('ea.get_send_sec_3 Failed!')
|
||||
return 'ea.get_send_sec_3 Failed'
|
||||
sleep(10)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
handel_page_and_code = ea.handel_page_and_code(codex,value,val2)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
if 'ALERT_to_mnay_code_chek' in handel_page_and_code:
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
if isinstance(handel_page_and_code, str):return handel_page_and_code
|
||||
@@ -3073,7 +3096,7 @@ def main(path_png_file,
|
||||
print('handel_page_and_code Failed!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
print('creat >>>', creat)
|
||||
if isinstance(creat, str):return creat
|
||||
@@ -3099,7 +3122,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()
|
||||
# #####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
|
||||
@@ -3116,9 +3139,9 @@ def main(path_png_file,
|
||||
return 'ea.get_send_sec_3 Failed'
|
||||
sleep(10)
|
||||
send_green_status(server)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
handel_page_and_code = ea.handel_page_and_code(codex,value,val2)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
if 'ALERT_to_mnay_code_chek' in handel_page_and_code:
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
if isinstance(handel_page_and_code, str):return handel_page_and_code
|
||||
@@ -3150,9 +3173,9 @@ def main(path_png_file,
|
||||
|
||||
|
||||
if 'make_other_time'==accept:
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
#return 'make_other_time'
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
#return 'make_other_time'
|
||||
sleep(10)
|
||||
get_seting_sec_1 = ea.get_seting_sec_1()
|
||||
@@ -3166,7 +3189,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()
|
||||
######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
|
||||
@@ -3183,9 +3206,9 @@ def main(path_png_file,
|
||||
print('ea.get_send_sec_3 Failed!')
|
||||
return 'ea.get_send_sec_3 Failed'
|
||||
sleep(10)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
handel_page_and_code = ea.handel_page_and_code(codex,value,val2)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
if 'ALERT_to_mnay_code_chek' in handel_page_and_code:
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
if isinstance(handel_page_and_code, str):return handel_page_and_code
|
||||
@@ -3194,7 +3217,7 @@ def main(path_png_file,
|
||||
print('handel_page_and_code Failed!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
|
||||
|
||||
@@ -3234,7 +3257,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()
|
||||
######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
|
||||
@@ -3250,9 +3273,9 @@ def main(path_png_file,
|
||||
print('ea.get_send_sec_3 Failed!')
|
||||
return 'ea.get_send_sec_3 Failed'
|
||||
sleep(10)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
handel_page_and_code = ea.handel_page_and_code(codex,value,val2)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
if 'ALERT_to_mnay_code_chek' in handel_page_and_code:
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
if 'ALERT_to_mnay_code_chek' in handel_page_and_code:
|
||||
@@ -3263,7 +3286,7 @@ def main(path_png_file,
|
||||
print('handel_page_and_code Failed!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
|
||||
print('creat >>>', creat)
|
||||
@@ -3296,7 +3319,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()
|
||||
# #####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
|
||||
@@ -3313,9 +3336,9 @@ def main(path_png_file,
|
||||
print('ea.get_send_sec_3 Failed!')
|
||||
return 'ea.get_send_sec_3 Failed'
|
||||
sleep(10)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
handel_page_and_code = ea.handel_page_and_code(codex,value,val2)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
if 'ALERT_to_mnay_code_chek' in handel_page_and_code:
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
if isinstance(handel_page_and_code, str):return handel_page_and_code
|
||||
@@ -3324,7 +3347,7 @@ def main(path_png_file,
|
||||
print('handel_page_and_code Failed!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
# Open new tab
|
||||
|
||||
@@ -3340,7 +3363,7 @@ def main(path_png_file,
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
|
||||
print('----------//////////',get_turn_on_2)
|
||||
#####import pdb;pdb.set_trace()
|
||||
######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
|
||||
@@ -3357,9 +3380,9 @@ def main(path_png_file,
|
||||
print('ea.get_send_sec_3 Failed!')
|
||||
return 'ea.get_send_sec_3 Failed'
|
||||
sleep(10)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
handel_page_and_code = ea.handel_page_and_code(codex,value,val2)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
if 'ALERT_to_mnay_code_chek' in handel_page_and_code:
|
||||
return 'ALERT_to_mnay_code_chek'
|
||||
if isinstance(handel_page_and_code, str):return handel_page_and_code
|
||||
@@ -3368,7 +3391,7 @@ def main(path_png_file,
|
||||
print('handel_page_and_code Failed!')
|
||||
return 'handel_page_and_code Failed'
|
||||
###########################################^^^^
|
||||
#####import pdb;pdb.set_trace()
|
||||
######import pdb;pdb.set_trace()
|
||||
return handel_page_and_code
|
||||
|
||||
|
||||
@@ -3736,7 +3759,7 @@ def process_emails():
|
||||
os.system("taskkill /f /im chromedriver.exe")
|
||||
os.system("taskkill /f /im Camoufox.exe")
|
||||
#input('>>>')
|
||||
# ###import pdb;pdb.set_trace()
|
||||
# ####import pdb;pdb.set_trace()
|
||||
codexs=Gmail(value,val2,browser_proxy=browser_proxy)
|
||||
print('codexs>>>>>>>>>>>>>>>',codexs)
|
||||
minimize_camoufox(title_hint="Camoufox")
|
||||
@@ -3745,12 +3768,12 @@ def process_emails():
|
||||
#print(codexs)
|
||||
# code=codexs.get_code()
|
||||
# print(code)
|
||||
# ####import pdb;pdb.set_trace() chek_logo >>> jump_to_sec
|
||||
# #####import pdb;pdb.set_trace() chek_logo >>> jump_to_sec
|
||||
|
||||
# input('>>>')
|
||||
#
|
||||
#
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
try:
|
||||
if codexs.flag_user==False:
|
||||
check_cookiesx=codexs.flag_user_sg
|
||||
@@ -3758,15 +3781,15 @@ def process_emails():
|
||||
|
||||
check_cookiesx=(codexs.check_cookies())
|
||||
print('check_cookiesx>>>>>>>>>>',check_cookiesx)
|
||||
|
||||
###import pdb;pdb.set_trace()
|
||||
import pdb;pdb.set_trace()
|
||||
#import pdb;pdb.set_trace()
|
||||
#check_cookiesx=str(codexs.check_cookies())
|
||||
# if codexs.flag_exit==True:
|
||||
# codexs.flag_exit=None
|
||||
# codexs.end()
|
||||
# codexs=Gmail(value,val2,browser_proxy=browser_proxy)
|
||||
# check_cookiesx=str(codexs.check_cookies())
|
||||
if 'kill' in check_cookiesx:
|
||||
if 'kill' in check_cookiesx or 'Kill' in check_cookiesx:
|
||||
codexs.end()
|
||||
os.system("taskkill /f /im chrome.exe")
|
||||
os.system("taskkill /f /im chromedriver.exe")
|
||||
@@ -3888,7 +3911,7 @@ def process_emails():
|
||||
clear_selected_folders([value])
|
||||
codexs.end()
|
||||
continue
|
||||
if 'fail_cookes' in check_cookiesx:
|
||||
if 'fail_cookes' in check_cookiesx or 'Kill' in check_cookiesx:
|
||||
os.system("taskkill /f /im chrome.exe")
|
||||
os.system("taskkill /f /im chromedriver.exe")
|
||||
os.system("taskkill /f /im chrome.exe")
|
||||
@@ -3972,7 +3995,7 @@ def process_emails():
|
||||
continue
|
||||
|
||||
# try:
|
||||
# ####import pdb;pdb.set_trace()
|
||||
# #####import pdb;pdb.set_trace()
|
||||
#ظdata = eval(check_cookiesx)
|
||||
# check_cookiesx = json.dumps(data, indent=4)
|
||||
# except Exception as e:
|
||||
@@ -3993,9 +4016,9 @@ def process_emails():
|
||||
|
||||
|
||||
send_green_status(server)
|
||||
# ####import pdb;pdb.set_trace()
|
||||
# #####import pdb;pdb.set_trace()
|
||||
result=main(path_png_file,browser,os.path.join(path_file,value),get_cookes=check_cookiesx,codex=codexs,value=value, val2=val2,browser_proxy=browser_proxy)
|
||||
####import pdb;pdb.set_trace()
|
||||
#####import pdb;pdb.set_trace()
|
||||
###################
|
||||
# fail_15_send_sec_code_app_code
|
||||
# if '11111111' in result:
|
||||
|
||||
Reference in New Issue
Block a user