speechtotext works

This commit is contained in:
2022-09-30 21:05:06 +02:00
parent a5c4902d9d
commit 78fcf10217
5 changed files with 19 additions and 18 deletions
+4 -3
View File
@@ -145,7 +145,8 @@ def need_to_valid_url(url: str, successful_items) -> bool:
def need_to_check_email(mail: str, successful_items) -> bool:
# return True
return True
print("successful_items size is " + str(len(successful_items)))
for item in successful_items:
if mail in item.email:
if item.url_validated is not None:
@@ -181,7 +182,7 @@ def read_mails():
mail_reader = MailReader(mail.mail, mail.password)
executor.submit(mail_reader.read_emails, mails_messages)
with ThreadPoolExecutor(max_workers=5) as executor:
with ThreadPoolExecutor(max_workers=8) as executor:
for mail in mails_messages:
match = re.search(VALIDATION_URL_REGEX, mail.body)
if match:
@@ -189,7 +190,7 @@ def read_mails():
if need_to_valid_url(url, successful_items):
url_validator = LinkValidator(url)
print("need to validate url: " + url)
executor.submit(url_validator.start_page, params.get_proxy(ProxyType.RESIDENTIAL), True)
executor.submit(url_validator.start_page, params.get_proxy(ProxyType.RESIDENTIAL), False)
else:
print("do not need to click url --> {}".format(mail.mail_address))