From d707bd56e0c8cb228f4acf3a71f11e1a0c79ab84 Mon Sep 17 00:00:00 2001 From: PAN Lei Date: Thu, 4 Aug 2022 12:11:28 +0200 Subject: [PATCH] add mail_manager.py --- mail_manager.py | 4 ++++ src/mail/mail_reader.py | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 mail_manager.py diff --git a/mail_manager.py b/mail_manager.py new file mode 100644 index 0000000..36074d8 --- /dev/null +++ b/mail_manager.py @@ -0,0 +1,4 @@ +from src.mail.mail_reader import read_mails + +if __name__ == '__main__': + read_mails() \ No newline at end of file diff --git a/src/mail/mail_reader.py b/src/mail/mail_reader.py index 856958a..6792a4a 100644 --- a/src/mail/mail_reader.py +++ b/src/mail/mail_reader.py @@ -111,8 +111,7 @@ def need_to_valid_url(url: str, successful_items) -> bool: return False -# check whether the url has already been clicked -if __name__ == '__main__': +def read_mails(): mail_address1 = MailAddress(mail="appointment2022@aol.com", password="gyilpmvyyvlcaviq") mail_address2 = MailAddress(mail="chenpeijun@aol.com", password="ytifuwguknzifqyb") mail_address3 = MailAddress(mail="ciyuexie@aol.com", password="czezlmmyypokdfce") @@ -135,3 +134,8 @@ if __name__ == '__main__': executor.submit(url_validator.start_page, params.get_proxy(ProxyType.BRIGHT_DATA), True) else: print("do not need to click url --> {}".format(mail)) + + +# check whether the url has already been clicked +if __name__ == '__main__': + read_mails()