This commit is contained in:
27942
2025-10-23 13:48:57 +08:00
parent bcc94159de
commit f9dfaedcbd
4 changed files with 177 additions and 76 deletions

45
test.py
View File

@@ -1,38 +1,9 @@
import requests
from logly import *
headers = {
'Accept': '*/*',
'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7InVpZCI6IjY0MzNiMDMyNTBmYTQ5YTI1ZWNlYmQzMCIsInZlcnNpb24iOjAsImJyYW5jaCI6InpoIiwicGhvbmUiOiIxNzE2ODM2MDQwOCJ9LCJpYXQiOjE3NjExMDMyNzcsImV4cCI6MTc2MTI3NjA3N30.k_R1gSUW9XpE6uRiCdHrEA8MXGjGpGoWVTrhSGz-0Cc',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'DNT': '1',
'Pragma': 'no-cache',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'none',
'Sec-Fetch-Storage-Access': 'active',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0',
'i-app': 'hitab',
'i-branch': 'zh',
'i-lang': 'zh-CN',
'i-platform': 'edge',
'i-version': '2.2.16',
'sec-ch-ua': '"Microsoft Edge";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
}
response = requests.get('https://api.wetab.link/api/chat-v3/chat/history', headers=headers)
for i in response.json()["data"]['list']:
print(i)
json_data = {
'clId': i["id"],
'source': 'chat',
}
response = requests.post('https://api.wetab.link/api/chat-v3/conversation/delete', headers=headers, json=json_data)
print(response.json())
logger.add(
"logs/app.log",
rotation="daily", # 或 "hourly", "10MB"
retention=7,
async_write=True # 启用异步写入,不阻塞主线程
)
logger.success("jegferwgrewgerwg")