correction on the logs
This commit is contained in:
@@ -131,11 +131,6 @@ class MailReader():
|
||||
return mail_messages
|
||||
|
||||
|
||||
def clean(text):
|
||||
# clean text for creating a folder
|
||||
return "".join(c if c.isalnum() else "_" for c in text)
|
||||
|
||||
|
||||
def need_to_valid_url(url: str, successful_items) -> bool:
|
||||
if len(successful_items) == 0:
|
||||
return False
|
||||
@@ -167,7 +162,7 @@ def need_to_check_email(mail: str, successful_items) -> bool:
|
||||
for item in successful_items:
|
||||
if mail in item.email:
|
||||
if item.url_validated is not None:
|
||||
print("url_validated for {} is {}".format(item.url_validated, mail))
|
||||
print("url_validated for {} is {}".format(mail, item.url_validated))
|
||||
return not item.url_validated
|
||||
else:
|
||||
# if url-validated is none, need to check email
|
||||
@@ -205,10 +200,10 @@ def read_mails():
|
||||
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)
|
||||
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), True)
|
||||
# executor.submit(url_validator.start_page, params.get_proxy(ProxyType.OXYLABS), False)
|
||||
else:
|
||||
print("do not need to click url --> {}".format(mail.mail_address))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user