summaryrefslogtreecommitdiff
path: root/index.py
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-09-03 10:05:44 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-09-03 10:05:44 +0800
commitfb0a9f51c3c719ceda3ada03fa2171b4dc26ea69 (patch)
tree3f6f7f39365cbceae455b90fe79b8db327fb5e64 /index.py
parent59df8df7e7b1deeb14f79a1bfb2985f8ce3a13cd (diff)
updated
Diffstat (limited to 'index.py')
-rw-r--r--index.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/index.py b/index.py
index 6c10480..f54c216 100644
--- a/index.py
+++ b/index.py
@@ -1,10 +1,10 @@
from flask import Flask, request
import requests
-app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024
-
app = Flask(__name__)
+app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024
+
# Set up the necessary variables
token = "MTE0MTM0MDA2Mzk2ODU0MjczMA.GX75jG.frFFekrXjqk1BrAuTftSYClt1ERQn8BY2FiZgg"
channel_id = '1140989222556274721'
@@ -24,7 +24,10 @@ def handle_post_request():
'content': "cao"
}
requests.post(url, headers=header, data=dbug)#DEBUGGGG=======
- message = request.get_data().decode('utf-8')
+ try:
+ message = request.get_data().decode('utf-8')
+ except UnicodeDecodeError:
+ message = request.get_data()
requests.post(url, headers=header, data=dbug)#DEBUGGGG=======
isFile = False