diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-09-03 10:05:44 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-09-03 10:05:44 +0800 |
| commit | fb0a9f51c3c719ceda3ada03fa2171b4dc26ea69 (patch) | |
| tree | 3f6f7f39365cbceae455b90fe79b8db327fb5e64 /index.py | |
| parent | 59df8df7e7b1deeb14f79a1bfb2985f8ce3a13cd (diff) | |
updated
Diffstat (limited to 'index.py')
| -rw-r--r-- | index.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 |
