Omkar008 commited on
Commit
d26423a
1 Parent(s): 3566981

Update get_gmail_data.py

Browse files
Files changed (1) hide show
  1. 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 , links , {filename:data}
167
 
168
- return subject, body, links , None
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({"subject": subject, "body": body, "attachment_data": attachment_data})
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