close the browser when url sent by email

This commit is contained in:
2022-08-03 09:55:26 +02:00
parent 0b203b00ee
commit 42c47e7abe
4 changed files with 7 additions and 5 deletions
+2 -2
View File
@@ -61,6 +61,6 @@ def get_proxy(proxy_type=ProxyType.BRIGHT_DATA):
if __name__ == '__main__': if __name__ == '__main__':
# 修改联系人行,结束联系人行 第三个参数store等于0的时候是随机,传入1的时候是总店 # 修改联系人行,结束联系人行 第三个参数store等于0的时候是随机,传入1的时候是总店
start_book(744, 792, store_choose_state=1, mode=ModeEnum.AUTOMATIC, headless=False) # start_book(744, 858, store_choose_state=1, mode=ModeEnum.AUTOMATIC, headless=False)
# start_book(1172, 1324, store_choose_state=1, mode=ModeEnum.AUTOMATIC, headless=False) start_book(1171, 1387, store_choose_state=1, mode=ModeEnum.AUTOMATIC, headless=False)
# recheck_the_captcha_error_contacts(store_type=1, mode=ModeEnum.AUTOMATIC, on_no_contact_found=lambda: None, headless=False) # recheck_the_captcha_error_contacts(store_type=1, mode=ModeEnum.AUTOMATIC, on_no_contact_found=lambda: None, headless=False)
+4 -2
View File
@@ -87,6 +87,10 @@ hermes_email = "no-reply@hermes.com"
username = "chenpeijun@aol.com" username = "chenpeijun@aol.com"
password = "ytifuwguknzifqyb" password = "ytifuwguknzifqyb"
# #
#
# username = "ciyuexie@aol.com"
# password = "czezlmmyypokdfce"
def clean(text): def clean(text):
@@ -116,8 +120,6 @@ def need_to_valid_url(url: str, successful_items) -> bool:
# check whether the url has already been clicked # check whether the url has already been clicked
if __name__ == '__main__': if __name__ == '__main__':
mail_reader = MailReader(username, password) mail_reader = MailReader(username, password)
successful_items = MONGO_STORE_MANAGER.get_all_successful_items_for_day() successful_items = MONGO_STORE_MANAGER.get_all_successful_items_for_day()
+1 -1
View File
@@ -151,7 +151,7 @@ def write_new_contacts_to_excel(valid_contacts: list, generate_passport = True):
if __name__ == '__main__': if __name__ == '__main__':
excel_reader = ExcelHelper() excel_reader = ExcelHelper()
contacts = excel_reader.read_names("/Users/lpan/Downloads/real_contacts_31.xls") contacts = excel_reader.read_names("/Users/lpan/Documents/rdv/real_contacts_318.xlsx")
print(contacts) print(contacts)
write_new_contacts_to_excel(valid_contacts=contacts) write_new_contacts_to_excel(valid_contacts=contacts)
# for mail in excel_reader.read_mails_and_pwd(): # for mail in excel_reader.read_mails_and_pwd():
Binary file not shown.