mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-04-14 09:38:57 +00:00
Downgrade mailparser to 3.5.1
This commit is contained in:
@@ -176,6 +176,7 @@ def human_timestamp_to_datetime(human_timestamp):
|
||||
Returns:
|
||||
DateTime: The converted timestamp
|
||||
"""
|
||||
human_timestamp = human_timestamp.replace("T", " ")
|
||||
return datetime.strptime(human_timestamp, "%Y-%m-%d %H:%M:%S")
|
||||
|
||||
|
||||
@@ -189,6 +190,7 @@ def human_timestamp_to_timestamp(human_timestamp):
|
||||
Returns:
|
||||
float: The converted timestamp
|
||||
"""
|
||||
human_timestamp = human_timestamp.replace("T", " ")
|
||||
return human_timestamp_to_datetime(human_timestamp).timestamp()
|
||||
|
||||
|
||||
@@ -390,8 +392,6 @@ def parse_email(data):
|
||||
headers = json.loads(parsed_email.headers_json).copy()
|
||||
parsed_email = json.loads(parsed_email.mail_json).copy()
|
||||
parsed_email["headers"] = headers
|
||||
if "date" in headers:
|
||||
parsed_email["date"] = headers["date"].replace("T", " ")
|
||||
if "received" in parsed_email:
|
||||
for received in parsed_email["received"]:
|
||||
if "date_utc" in received:
|
||||
|
||||
@@ -6,7 +6,7 @@ xmltodict
|
||||
geoip2
|
||||
dnspython
|
||||
imapclient
|
||||
mail-parser
|
||||
mail-parser==3.5.1
|
||||
dateparser
|
||||
elasticsearch>=6.3.0,<7.0.0
|
||||
elasticsearch-dsl>=6.2.1,<7.0.0
|
||||
|
||||
5
setup.py
5
setup.py
@@ -93,8 +93,9 @@ setup(
|
||||
# requirements files see:
|
||||
# https://packaging.python.org/en/latest/requirements.html
|
||||
install_requires=['dnspython', 'publicsuffix', 'xmltodict', 'geoip2',
|
||||
'urllib3', 'requests', 'imapclient', 'mail-parser',
|
||||
'dateparser', 'elasticsearch>=6.3.0,<7.0.0',
|
||||
'urllib3', 'requests', 'imapclient',
|
||||
'mail-parser==3.5.1', 'dateparser',
|
||||
'elasticsearch>=6.3.0,<7.0.0',
|
||||
'elasticsearch-dsl>=6.2.1,<7.0.0', 'kafka-python'
|
||||
],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user