extract-msg 0.53.1__tar.gz → 0.53.2__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.
- {extract_msg-0.53.1 → extract_msg-0.53.2}/CHANGELOG.md +7 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/PKG-INFO +3 -3
- {extract_msg-0.53.1 → extract_msg-0.53.2}/README.rst +2 -2
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/__init__.py +2 -2
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/signed_att.py +8 -2
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/message_base.py +19 -5
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/task_request.py +1 -1
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/toc_entry.py +1 -1
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/utils.py +10 -3
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg.egg-info/PKG-INFO +3 -3
- {extract_msg-0.53.1 → extract_msg-0.53.2}/LICENSE.txt +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/MANIFEST.in +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/__main__.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/_rtf/__init__.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/_rtf/create_doc.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/_rtf/inject_rtf.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/_rtf/token.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/_rtf/tokenize_rtf.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/__init__.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/attachment.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/attachment_base.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/broken_att.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/custom_att.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/custom_att_handler/__init__.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/custom_att_handler/custom_handler.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/custom_att_handler/lnk_obj_att.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/custom_att_handler/outlook_image_dib.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/custom_att_handler/outlook_image_meta.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/emb_msg_att.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/unsupported_att.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/web_att.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/constants/__init__.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/constants/ps.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/constants/re.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/constants/st.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/data/logging-config/logging-nt.json +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/data/logging-config/logging-posix.json +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/encoding/__init__.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/encoding/_dt/__init__.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/encoding/_dt/_mac_ce.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/encoding/_dt/_mac_cyrillic.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/encoding/_dt/_mac_greek.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/encoding/_dt/_mac_iceland.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/encoding/_dt/_mac_turkish.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/encoding/_dt/_win874_dec.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/encoding/_dt/_win950_dec.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/encoding/utils.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/enums.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/exceptions.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/__init__.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/appointment.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/calendar.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/calendar_base.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/contact.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/journal.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/meeting_cancellation.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/meeting_exception.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/meeting_forward.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/meeting_related.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/meeting_request.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/meeting_response.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/message.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/message_signed.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/message_signed_base.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/msg.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/post.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/sticky_note.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/msg_classes/task.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/null_date.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/ole_writer.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/open_msg.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/properties/__init__.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/properties/named.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/properties/prop.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/properties/properties_store.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/py.typed +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/recipient.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/__init__.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/_helpers.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/business_card.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/cfoas.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/contact_link_entry.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/dev_mode_a.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/dv_target_device.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/entry_id.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/misc_id.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/mon_stream.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/odt.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/ole_pres.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/ole_stream_struct.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/recurrence_pattern.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/report_tag.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/system_time.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/time_zone_definition.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/time_zone_struct.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/structures/tz_rule.py +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg.egg-info/SOURCES.txt +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg.egg-info/dependency_links.txt +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg.egg-info/entry_points.txt +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg.egg-info/requires.txt +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg.egg-info/top_level.txt +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/requirements.txt +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/setup.cfg +0 -0
- {extract_msg-0.53.1 → extract_msg-0.53.2}/setup.py +0 -0
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
**v0.53.2**
|
|
2
|
+
* [[TeamMsgExtractor #452](https://github.com/TeamMsgExtractor/msg-extractor/issues/452)] Adjusted code to allow html encoding to be cached to try to speed up `bs4` operations.
|
|
3
|
+
* [[TeamMsgExtractor #453](https://github.com/TeamMsgExtractor/msg-extractor/issues/453)] Fixed handler for too large filetimes so that some filetimes being too large doesn't break the handler.
|
|
4
|
+
* Fixed a bug that would cause an error in task objects due to a lack of `enumerate`.
|
|
5
|
+
* Fix `TOCEntry` not initializing `DVTargetDevice` correctly.
|
|
6
|
+
* Add temporary properties for `ContentID` to `SignedAttachment`. AFAIK these can't ever be set, but this prevents errors in some places.
|
|
7
|
+
|
|
1
8
|
**v0.53.1**
|
|
2
9
|
* Expanded allowable range for `red-black-tree-mod`.
|
|
3
10
|
* Fix issue with `MessageBase.asEmailMessage()` that prevented embedded MSG files from being attached.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: extract_msg
|
|
3
|
-
Version: 0.53.
|
|
3
|
+
Version: 0.53.2
|
|
4
4
|
Summary: Extracts emails and attachments saved in Microsoft Outlook's .msg files
|
|
5
5
|
Home-page: https://github.com/TeamMsgExtractor/msg-extractor
|
|
6
6
|
Download-URL: https://github.com/TeamMsgExtractor/msg-extractor/archives/master
|
|
@@ -278,8 +278,8 @@ your access to the newest major version of extract-msg.
|
|
|
278
278
|
.. |License: GPL v3| image:: https://img.shields.io/badge/License-GPLv3-blue.svg
|
|
279
279
|
:target: LICENSE.txt
|
|
280
280
|
|
|
281
|
-
.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.53.
|
|
282
|
-
:target: https://pypi.org/project/extract-msg/0.53.
|
|
281
|
+
.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.53.2-blue.svg
|
|
282
|
+
:target: https://pypi.org/project/extract-msg/0.53.2/
|
|
283
283
|
|
|
284
284
|
.. |PyPI2| image:: https://img.shields.io/badge/python-3.8+-brightgreen.svg
|
|
285
285
|
:target: https://www.python.org/downloads/release/python-3810/
|
|
@@ -260,8 +260,8 @@ your access to the newest major version of extract-msg.
|
|
|
260
260
|
.. |License: GPL v3| image:: https://img.shields.io/badge/License-GPLv3-blue.svg
|
|
261
261
|
:target: LICENSE.txt
|
|
262
262
|
|
|
263
|
-
.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.53.
|
|
264
|
-
:target: https://pypi.org/project/extract-msg/0.53.
|
|
263
|
+
.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.53.2-blue.svg
|
|
264
|
+
:target: https://pypi.org/project/extract-msg/0.53.2/
|
|
265
265
|
|
|
266
266
|
.. |PyPI2| image:: https://img.shields.io/badge/python-3.8+-brightgreen.svg
|
|
267
267
|
:target: https://www.python.org/downloads/release/python-3810/
|
|
@@ -27,8 +27,8 @@ https://github.com/TeamMsgExtractor/msg-extractor
|
|
|
27
27
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
28
28
|
|
|
29
29
|
__author__ = 'Destiny Peterson & Matthew Walker'
|
|
30
|
-
__date__ = '2025-
|
|
31
|
-
__version__ = '0.53.
|
|
30
|
+
__date__ = '2025-03-14'
|
|
31
|
+
__version__ = '0.53.2'
|
|
32
32
|
|
|
33
33
|
__all__ = [
|
|
34
34
|
# Modules:
|
|
@@ -45,7 +45,7 @@ class SignedAttachment:
|
|
|
45
45
|
self.__node = node
|
|
46
46
|
self.__treePath = msg.treePath + [makeWeakRef(self)]
|
|
47
47
|
|
|
48
|
-
self.__data =
|
|
48
|
+
self.__data = b''
|
|
49
49
|
# To add support for embedded MSG files, we are going to completely
|
|
50
50
|
# ignore the mimetype and just do a few simple checks to see if we can
|
|
51
51
|
# use the bytes as am embedded file.
|
|
@@ -59,7 +59,7 @@ class SignedAttachment:
|
|
|
59
59
|
except Exception:
|
|
60
60
|
logger.exception('Signed message was an OLE file, but could not be read as an MSG file due to an exception.')
|
|
61
61
|
|
|
62
|
-
if self.__data
|
|
62
|
+
if not self.__data:
|
|
63
63
|
self.__data = data
|
|
64
64
|
|
|
65
65
|
def _handleFnc(self, _zip, filename, customPath: pathlib.Path, kwargs) -> pathlib.Path:
|
|
@@ -205,6 +205,12 @@ class SignedAttachment:
|
|
|
205
205
|
def asBytes(self) -> bytes:
|
|
206
206
|
return self.__asBytes
|
|
207
207
|
|
|
208
|
+
@property
|
|
209
|
+
def contentID(self) -> None:
|
|
210
|
+
return None
|
|
211
|
+
|
|
212
|
+
cid = contentID
|
|
213
|
+
|
|
208
214
|
@property
|
|
209
215
|
def data(self) -> Union[bytes, MSGFile]:
|
|
210
216
|
"""
|
|
@@ -96,6 +96,7 @@ class MessageBase(MSGFile):
|
|
|
96
96
|
except Exception as e:
|
|
97
97
|
# Prevent an error in the body from preventing opening.
|
|
98
98
|
logger.exception('Critical error accessing the body. File opened but accessing the body will throw an exception.')
|
|
99
|
+
self._htmlEncoding = None
|
|
99
100
|
except:
|
|
100
101
|
try:
|
|
101
102
|
self.close()
|
|
@@ -142,6 +143,16 @@ class MessageBase(MSGFile):
|
|
|
142
143
|
|
|
143
144
|
return value
|
|
144
145
|
|
|
146
|
+
def _getHtmlEncoding(self, soup: bs4.BeautifulSoup) -> None:
|
|
147
|
+
"""
|
|
148
|
+
Helper function to set the html encoding.
|
|
149
|
+
"""
|
|
150
|
+
if not self._htmlEncoding:
|
|
151
|
+
try:
|
|
152
|
+
self._htmlEncoding = cast(Optional[str], soup.original_encoding or soup.declared_html_encoding)
|
|
153
|
+
except AttributeError:
|
|
154
|
+
pass
|
|
155
|
+
|
|
145
156
|
def asEmailMessage(self) -> EmailMessage:
|
|
146
157
|
"""
|
|
147
158
|
Returns an instance of EmailMessage used to represent the contents of
|
|
@@ -380,7 +391,8 @@ class MessageBase(MSGFile):
|
|
|
380
391
|
|
|
381
392
|
# If we are preparing the HTML, then we should
|
|
382
393
|
if preparedHtml and charset:
|
|
383
|
-
bs = bs4.BeautifulSoup(data, features = 'html.parser')
|
|
394
|
+
bs = bs4.BeautifulSoup(data, features = 'html.parser', from_encoding = self._htmlEncoding)
|
|
395
|
+
self._getHtmlEncoding(bs)
|
|
384
396
|
if not bs.find('meta', {'http-equiv': 'Content-Type'}):
|
|
385
397
|
# Setup the attributes for the tag.
|
|
386
398
|
tagAttrs = {
|
|
@@ -405,7 +417,7 @@ class MessageBase(MSGFile):
|
|
|
405
417
|
|
|
406
418
|
return data
|
|
407
419
|
else:
|
|
408
|
-
return self.htmlBody
|
|
420
|
+
return self.htmlBody or b''
|
|
409
421
|
|
|
410
422
|
def getSavePdfBody(self, wkPath = None, wkOptions = None, **kwargs) -> bytes:
|
|
411
423
|
"""
|
|
@@ -501,7 +513,7 @@ class MessageBase(MSGFile):
|
|
|
501
513
|
body = self.htmlBody
|
|
502
514
|
|
|
503
515
|
# Validate the HTML.
|
|
504
|
-
if not validateHtml(body):
|
|
516
|
+
if not validateHtml(body, self._htmlEncoding):
|
|
505
517
|
logger.warning('HTML body failed to validate. Code will attempt to correct it.')
|
|
506
518
|
|
|
507
519
|
# If we are here, then we need to do what we can to fix the HTML
|
|
@@ -511,7 +523,8 @@ class MessageBase(MSGFile):
|
|
|
511
523
|
# the <html> and <body> tag are missing, we determine where to put
|
|
512
524
|
# the body tag (around everything if there is no <head> tag,
|
|
513
525
|
# otherwise at the end) and then wrap it all in the <html> tag.
|
|
514
|
-
parser = bs4.BeautifulSoup(body, features = 'html.parser')
|
|
526
|
+
parser = bs4.BeautifulSoup(body, features = 'html.parser', from_encoding = self._htmlEncoding)
|
|
527
|
+
self._getHtmlEncoding(parser)
|
|
515
528
|
if not parser.find('html') and not parser.find('body'):
|
|
516
529
|
if parser.find('head') or parser.find('footer'):
|
|
517
530
|
# Create the parser we will be using for the corrections.
|
|
@@ -1186,7 +1199,8 @@ class MessageBase(MSGFile):
|
|
|
1186
1199
|
return self.htmlBody
|
|
1187
1200
|
|
|
1188
1201
|
# Create the BeautifulSoup instance to use.
|
|
1189
|
-
soup = bs4.BeautifulSoup(self.htmlBody, 'html.parser')
|
|
1202
|
+
soup = bs4.BeautifulSoup(self.htmlBody, 'html.parser', from_encoding = self._htmlEncoding)
|
|
1203
|
+
self._getHtmlEncoding(soup)
|
|
1190
1204
|
|
|
1191
1205
|
# Get a list of image tags to see if we can inject into. If the source
|
|
1192
1206
|
# of an image starts with "cid:" that means it is one of the attachments
|
|
@@ -63,7 +63,7 @@ class TaskRequest(MessageBase):
|
|
|
63
63
|
# The task object MUST be the first attachment, but we will be
|
|
64
64
|
# lenient and allow it to be in any position. It not existing,
|
|
65
65
|
# however, will not be tolerated.
|
|
66
|
-
task = next(((index, att) for index, att in self.attachments if isinstance(att.data, Task)), None)
|
|
66
|
+
task = next(((index, att) for index, att in enumerate(self.attachments) if isinstance(att.data, Task)), None)
|
|
67
67
|
|
|
68
68
|
if task is None:
|
|
69
69
|
if ErrorBehavior.STANDARDS_VIOLATION in self.errorBehavior:
|
|
@@ -295,7 +295,14 @@ def filetimeToDatetime(rawTime: int) -> datetime.datetime:
|
|
|
295
295
|
# Just make null dates from all of these time stamps.
|
|
296
296
|
from .null_date import NullDate
|
|
297
297
|
date = NullDate(1970, 1, 1, 1)
|
|
298
|
-
|
|
298
|
+
try:
|
|
299
|
+
date += datetime.timedelta(seconds = filetimeToUtc(rawTime))
|
|
300
|
+
except OverflowError:
|
|
301
|
+
# Time value is so large we physically can't represent it, so
|
|
302
|
+
# let's just modify the date to it's highest possible value and
|
|
303
|
+
# call it a day.
|
|
304
|
+
m = date.max
|
|
305
|
+
date = NullDate(m.year, m.month, m.day, m.hour, m.minute, m.second, m.microsecond)
|
|
299
306
|
date.filetime = rawTime
|
|
300
307
|
|
|
301
308
|
return date
|
|
@@ -1241,14 +1248,14 @@ def unwrapMultipart(mp: Union[bytes, str, email.message.Message]) -> Dict:
|
|
|
1241
1248
|
}
|
|
1242
1249
|
|
|
1243
1250
|
|
|
1244
|
-
def validateHtml(html: bytes) -> bool:
|
|
1251
|
+
def validateHtml(html: bytes, encoding: Optional[str]) -> bool:
|
|
1245
1252
|
"""
|
|
1246
1253
|
Checks whether the HTML is considered valid.
|
|
1247
1254
|
|
|
1248
1255
|
To be valid, the HTML must, at minimum, contain an ``<html>`` tag, a
|
|
1249
1256
|
``<body>`` tag, and closing tags for each.
|
|
1250
1257
|
"""
|
|
1251
|
-
bs = bs4.BeautifulSoup(html, 'html.parser')
|
|
1258
|
+
bs = bs4.BeautifulSoup(html, 'html.parser', from_encoding = encoding)
|
|
1252
1259
|
if not bs.find('html') or not bs.find('body'):
|
|
1253
1260
|
return False
|
|
1254
1261
|
return True
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: extract-msg
|
|
3
|
-
Version: 0.53.
|
|
3
|
+
Version: 0.53.2
|
|
4
4
|
Summary: Extracts emails and attachments saved in Microsoft Outlook's .msg files
|
|
5
5
|
Home-page: https://github.com/TeamMsgExtractor/msg-extractor
|
|
6
6
|
Download-URL: https://github.com/TeamMsgExtractor/msg-extractor/archives/master
|
|
@@ -278,8 +278,8 @@ your access to the newest major version of extract-msg.
|
|
|
278
278
|
.. |License: GPL v3| image:: https://img.shields.io/badge/License-GPLv3-blue.svg
|
|
279
279
|
:target: LICENSE.txt
|
|
280
280
|
|
|
281
|
-
.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.53.
|
|
282
|
-
:target: https://pypi.org/project/extract-msg/0.53.
|
|
281
|
+
.. |PyPI3| image:: https://img.shields.io/badge/pypi-0.53.2-blue.svg
|
|
282
|
+
:target: https://pypi.org/project/extract-msg/0.53.2/
|
|
283
283
|
|
|
284
284
|
.. |PyPI2| image:: https://img.shields.io/badge/python-3.8+-brightgreen.svg
|
|
285
285
|
:target: https://www.python.org/downloads/release/python-3810/
|
|
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
|
{extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/custom_att_handler/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/attachments/custom_att_handler/lnk_obj_att.py
RENAMED
|
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
|
{extract_msg-0.53.1 → extract_msg-0.53.2}/extract_msg/data/logging-config/logging-posix.json
RENAMED
|
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
|
|
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
|
|
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
|
|
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
|