Spaces:
Sleeping
Sleeping
Update get_gmail_data.py
Browse files- get_gmail_data.py +3 -3
get_gmail_data.py
CHANGED
@@ -163,9 +163,9 @@ class GmailDataExtractor:
|
|
163 |
|
164 |
if data:
|
165 |
# Save only the first 10 characters of the attachment data
|
166 |
-
return subject,body ,
|
167 |
|
168 |
-
return subject, body,
|
169 |
|
170 |
def extract_text_and_links(html_content: str) -> tuple:
|
171 |
"""
|
@@ -218,7 +218,7 @@ class GmailDataExtractor:
|
|
218 |
body = body if body is not None else ""
|
219 |
attachment_data = attachment_data if attachment_data is not None else {}
|
220 |
|
221 |
-
results.append({"
|
222 |
|
223 |
return {"results": results}
|
224 |
|
|
|
163 |
|
164 |
if data:
|
165 |
# Save only the first 10 characters of the attachment data
|
166 |
+
return subject,body ,{"filename":filename , "data"data}
|
167 |
|
168 |
+
return subject, body,None
|
169 |
|
170 |
def extract_text_and_links(html_content: str) -> tuple:
|
171 |
"""
|
|
|
218 |
body = body if body is not None else ""
|
219 |
attachment_data = attachment_data if attachment_data is not None else {}
|
220 |
|
221 |
+
results.append({"body": body, "attachment_data": attachment_data})
|
222 |
|
223 |
return {"results": results}
|
224 |
|