Spaces:
Running
Running
Update get_gmail_data.py
Browse files- get_gmail_data.py +3 -3
get_gmail_data.py
CHANGED
@@ -53,9 +53,9 @@ class GmailDataExtractor:
|
|
53 |
access_token = self.__jwt
|
54 |
print("access token")
|
55 |
print(access_token)
|
56 |
-
receipt_query = f'(subject:"your order" OR subject:receipts OR subject:receipt OR subject:invoice OR subject:invoice OR category:purchases)&maxResults=15'
|
57 |
-
if self.__user_input is not None:
|
58 |
-
|
59 |
gmail_url = f"https://www.googleapis.com/gmail/v1/users/me/messages?q={receipt_query}&maxResults=3"
|
60 |
def __fetch_page(url):
|
61 |
response = requests.get(url, headers={"Authorization": f"Bearer {access_token}"})
|
|
|
53 |
access_token = self.__jwt
|
54 |
print("access token")
|
55 |
print(access_token)
|
56 |
+
receipt_query = f'(subject:"your order" OR subject:receipts OR subject:receipt OR subject: aankoopbon OR subject:reçu OR subject:invoice OR subject:invoice OR category:purchases)&maxResults=15'
|
57 |
+
# if self.__user_input is not None:
|
58 |
+
# receipt_query = f'((subject:"your order" OR subject:receipts OR subject:receipt OR subject:invoice OR subject:invoice OR category:purchases) AND subject:{self.__user_input})&maxResults=15'
|
59 |
gmail_url = f"https://www.googleapis.com/gmail/v1/users/me/messages?q={receipt_query}&maxResults=3"
|
60 |
def __fetch_page(url):
|
61 |
response = requests.get(url, headers={"Authorization": f"Bearer {access_token}"})
|