xenoslib 0.1.29.9__tar.gz → 0.1.29.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xenoslib-0.1.29.9/xenoslib.egg-info → xenoslib-0.1.29.12}/PKG-INFO +1 -1
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/about.py +1 -1
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/mail.py +8 -2
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12/xenoslib.egg-info}/PKG-INFO +1 -1
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/LICENSE +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/README.md +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/setup.cfg +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/setup.py +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/__init__.py +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/__main__.py +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/base.py +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/dev.py +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/extend.py +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/linux.py +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/mock.py +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/onedrive.py +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/win_trayicon.py +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib/windows.py +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib.egg-info/SOURCES.txt +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib.egg-info/dependency_links.txt +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib.egg-info/requires.txt +0 -0
- {xenoslib-0.1.29.9 → xenoslib-0.1.29.12}/xenoslib.egg-info/top_level.txt +0 -0
|
@@ -73,7 +73,11 @@ class MailFetcher:
|
|
|
73
73
|
body = email.message_from_bytes(msg[b"BODY[]"])
|
|
74
74
|
subject = str(email.header.make_header(email.header.decode_header(body["Subject"])))
|
|
75
75
|
payload = body.get_payload(decode=True)
|
|
76
|
-
if
|
|
76
|
+
if body.is_multipart():
|
|
77
|
+
for part in body.walk():
|
|
78
|
+
if "text/plain" in part.get_content_type():
|
|
79
|
+
payload = part.get_payload(decode=True)
|
|
80
|
+
if isinstance(payload, bytes):
|
|
77
81
|
try:
|
|
78
82
|
payload = payload.decode()
|
|
79
83
|
except UnicodeDecodeError:
|
|
@@ -163,8 +167,10 @@ def test_imap():
|
|
|
163
167
|
for email_data in MailFetcher(
|
|
164
168
|
imap_server, mail_addr, mail_pwd, interval=1, days=1, skip_current=False
|
|
165
169
|
):
|
|
166
|
-
print(email_data["subject"])
|
|
170
|
+
# ~ print(email_data["subject"])
|
|
167
171
|
print(email_data["subjectx"])
|
|
172
|
+
print(email_data["payload"])
|
|
173
|
+
# ~ print(email_data.keys())
|
|
168
174
|
|
|
169
175
|
|
|
170
176
|
def test():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|