diff --git a/src/mail/mail_reader.py b/src/mail/mail_reader.py index 531ed09..bdb9cfb 100644 --- a/src/mail/mail_reader.py +++ b/src/mail/mail_reader.py @@ -191,18 +191,18 @@ def read_mails(): mail_reader = MailReader(mail.mail, mail.password) executor.submit(mail_reader.read_emails, mails_messages) - with ThreadPoolExecutor(max_workers=10) as executor: - for mail in mails_messages: - match = re.search(VALIDATION_URL_REGEX, mail.body) - if match: - url = match.group(0) - if need_to_valid_url(url, successful_items): - MONGO_STORE_MANAGER.save_links_to_validate(url) - # url_validator = LinkValidator(url) - # print("need to validate url: " + url) - # executor.submit(url_validator.start_page, params.get_proxy(ProxyType.OXYLABS), False) - else: - print("do not need to click url --> {}".format(mail.mail_address)) + # with ThreadPoolExecutor(max_workers=10) as executor: + for mail in mails_messages: + match = re.search(VALIDATION_URL_REGEX, mail.body) + if match: + url = match.group(0) + if need_to_valid_url(url, successful_items): + MONGO_STORE_MANAGER.save_links_to_validate(url) + # url_validator = LinkValidator(url) + # print("need to validate url: " + url) + # executor.submit(url_validator.start_page, params.get_proxy(ProxyType.OXYLABS), False) + else: + print("do not need to click url --> {}".format(mail.mail_address)) # check whether the url has already been clicked