From 2a17ae8526d527975ae0ad13f066355bb4aeeb71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D0=BB=D0=B8=D0=B3=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=BA=D0=BE=20=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Date: Wed, 3 Sep 2025 15:12:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5:=20=D0=A3=D1=81=D0=BB=D0=BE=D0=B2?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B4=D0=BB=D1=8F=20=D0=B8=D1=81=D0=BA=D0=BB?= =?UTF-8?q?=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B8=D0=B7=D0=BE=D0=B1?= =?UTF-8?q?=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=BA=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D1=8B=D0=B5=20=D0=B2=20=D1=82=D0=B5=D0=BB=D0=B5=20?= =?UTF-8?q?=D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- email_processor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/email_processor.py b/email_processor.py index 8172d50..aa9571e 100644 --- a/email_processor.py +++ b/email_processor.py @@ -138,6 +138,8 @@ def process_emails(): continue if part.get('Content-Disposition') is None: continue + if part.get_content_disposition() == 'inline': + continue attachment_count += 1 # Пропустить, если вложений несколько @@ -152,6 +154,8 @@ def process_emails(): continue if part.get('Content-Disposition') is None: continue + if part.get_content_disposition() == 'inline': + continue filename = part.get_filename() # Расшифровать имя файла, если оно закодировано @@ -330,6 +334,8 @@ def upload_files_to_web(processed_numbers): successful_uploads.append(number) + time.sleep(2) + except Exception as e: print(f"Не удалось загрузить файл для номера {number}: {str(e)}") failed_uploads.append(number)