Update app.py
Browse files
app.py
CHANGED
@@ -177,34 +177,34 @@ def request_to_v2(message, cookie, user_id,attachment=None,delst=True,context=[]
|
|
177 |
timeout = 5*60 #5分钟不回复,显示超时
|
178 |
context = [message]
|
179 |
headers = {
|
180 |
-
# 'Content-Type': 'application/json',
|
181 |
-
# 'Origin': 'https://claude.ai',
|
182 |
-
# 'Referer': f'https://claude.ai/chat/{channel_id}',
|
183 |
-
# 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36',
|
184 |
-
# 'Cookie': cookie,
|
185 |
-
# 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
|
186 |
-
# 'Accept': 'text/event-stream, text/event-stream',
|
187 |
-
# 'Sec-Ch-Ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"',
|
188 |
-
# 'Sec-Ch-Ua-Mobile': '?0',
|
189 |
-
# 'Sec-Ch-Ua-Platform': '"Windows"',
|
190 |
-
# 'Sec-Fetch-Dest': 'empty',
|
191 |
-
# 'Sec-Fetch-Mode': 'cors',
|
192 |
-
# 'Sec-Fetch-Site': 'same-origin',
|
193 |
-
# 'Connection': 'keep-alive',
|
194 |
-
|
195 |
-
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0',
|
196 |
-
'Accept': 'text/event-stream, text/event-stream',
|
197 |
-
'Accept-Language': 'en-US,en;q=0.5',
|
198 |
-
'Referer': 'https://claude.ai/chats',
|
199 |
'Content-Type': 'application/json',
|
200 |
'Origin': 'https://claude.ai',
|
201 |
-
'
|
202 |
-
'
|
203 |
'Cookie': cookie,
|
|
|
|
|
|
|
|
|
|
|
204 |
'Sec-Fetch-Dest': 'empty',
|
205 |
'Sec-Fetch-Mode': 'cors',
|
206 |
'Sec-Fetch-Site': 'same-origin',
|
207 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
|
209 |
}
|
210 |
post_msg_url = 'https://claude.ai/api/append_message'
|
|
|
177 |
timeout = 5*60 #5分钟不回复,显示超时
|
178 |
context = [message]
|
179 |
headers = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
'Content-Type': 'application/json',
|
181 |
'Origin': 'https://claude.ai',
|
182 |
+
'Referer': f'https://claude.ai/chat/{channel_id}',
|
183 |
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36',
|
184 |
'Cookie': cookie,
|
185 |
+
'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
|
186 |
+
'Accept': 'text/event-stream, text/event-stream',
|
187 |
+
'Sec-Ch-Ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"',
|
188 |
+
'Sec-Ch-Ua-Mobile': '?0',
|
189 |
+
'Sec-Ch-Ua-Platform': '"Windows"',
|
190 |
'Sec-Fetch-Dest': 'empty',
|
191 |
'Sec-Fetch-Mode': 'cors',
|
192 |
'Sec-Fetch-Site': 'same-origin',
|
193 |
+
'Connection': 'keep-alive',
|
194 |
+
|
195 |
+
# 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0',
|
196 |
+
# 'Accept': 'text/event-stream, text/event-stream',
|
197 |
+
# 'Accept-Language': 'en-US,en;q=0.5',
|
198 |
+
# 'Referer': 'https://claude.ai/chats',
|
199 |
+
# 'Content-Type': 'application/json',
|
200 |
+
# 'Origin': 'https://claude.ai',
|
201 |
+
# 'DNT': '1',
|
202 |
+
# 'Connection': 'keep-alive',
|
203 |
+
# 'Cookie': cookie,
|
204 |
+
# 'Sec-Fetch-Dest': 'empty',
|
205 |
+
# 'Sec-Fetch-Mode': 'cors',
|
206 |
+
# 'Sec-Fetch-Site': 'same-origin',
|
207 |
+
# 'TE': 'trailers'
|
208 |
|
209 |
}
|
210 |
post_msg_url = 'https://claude.ai/api/append_message'
|