Omkar008 commited on
Commit
09cc3a7
1 Parent(s): 5a38c96

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +4 -1
test.py CHANGED
@@ -69,8 +69,9 @@ async def test_google(code:str):
69
  user_info = requests.get("https://www.googleapis.com/oauth2/v1/userinfo", headers={"Authorization": f"Bearer {access_token}"})
70
  page_token = None
71
  messages = []
72
- user_query = f"subject:((receipt {brand_name}) OR (receipts {brand_name}) OR (reçu {brand_name}) OR (reçus {brand_name}) OR (Quittung {brand_name}) OR (Quittungen {brand_name}) OR (aankoopbon {brand_name}) OR (aankoopbonnen {brand_name}) OR (recibo {brand_name}) OR (recibos {brand_name}) OR (ricevuta {brand_name}) OR (ricevute {brand_name}) OR (ontvangstbewijs {brand_name}) OR (ontvangstbewijzen {brand_name})) has:attachment"
73
  # user_query = f"{brand_name} label:^smartlabel_receipt"
 
74
  while True:
75
  # Construct Gmail API request with pageToken
76
 
@@ -124,6 +125,8 @@ async def test_google(code:str):
124
  body_content = base64.urlsafe_b64decode(body_data.encode("UTF-8")).decode("UTF-8")
125
  print("Body Content:")
126
  print(body_content)
 
 
127
 
128
  # Check for parts in the message payload
129
  if "payload" in message_data and "parts" in message_data["payload"]:
 
69
  user_info = requests.get("https://www.googleapis.com/oauth2/v1/userinfo", headers={"Authorization": f"Bearer {access_token}"})
70
  page_token = None
71
  messages = []
72
+ # user_query = f"subject:((receipt {brand_name}) OR (receipts {brand_name}) OR (reçu {brand_name}) OR (reçus {brand_name}) OR (Quittung {brand_name}) OR (Quittungen {brand_name}) OR (aankoopbon {brand_name}) OR (aankoopbonnen {brand_name}) OR (recibo {brand_name}) OR (recibos {brand_name}) OR (ricevuta {brand_name}) OR (ricevute {brand_name}) OR (ontvangstbewijs {brand_name}) OR (ontvangstbewijzen {brand_name})) has:attachment"
73
  # user_query = f"{brand_name} label:^smartlabel_receipt"
74
+ user_query = "("invoice" OR (("tracking" OR "track") AND ("delivery" OR "package"))) OR (subject:order OR subject:receipt OR subject:receipts OR subject:invoice OR subject:invoice)"
75
  while True:
76
  # Construct Gmail API request with pageToken
77
 
 
125
  body_content = base64.urlsafe_b64decode(body_data.encode("UTF-8")).decode("UTF-8")
126
  print("Body Content:")
127
  print(body_content)
128
+ print()
129
+ print()
130
 
131
  # Check for parts in the message payload
132
  if "payload" in message_data and "parts" in message_data["payload"]: