|
1 | | -USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.2151.72" |
| 1 | +USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.2210.91" |
2 | 2 |
|
3 | 3 | CREATE_HEADERS = { |
4 | 4 | "Accept": "application/json", |
| 5 | + "Accept-Encoding": "gzip, deflate, br", |
5 | 6 | "Accept-Language": "en-US,en;q=0.9", |
6 | | - "Referer": "https://www.bing.com/copilot", |
7 | | - "Sec-Ch-Ua": '"Microsoft Edge";v="119", "Chromium";v="119", "Not?A_Brand";v="8"', |
| 7 | + "Referer": "https://copilot.microsoft.com/", |
| 8 | + "Sec-Ch-Ua": '"Microsoft Edge";v="120", "Chromium";v="120", "Not?A_Brand";v="8"', |
8 | 9 | "Sec-Ch-Ua-Mobile": "?0", |
9 | 10 | "Sec-Ch-Ua-Platform": "Windows", |
10 | 11 | "Sec-Fetch-Dest": "empty", |
|
15 | 16 | } |
16 | 17 |
|
17 | 18 | CHATHUB_HEADERS = { |
18 | | - "Pragma": "no-cache", |
19 | | - "Origin": "https://www.bing.com", |
| 19 | + "Accept-Encoding": "gzip, deflate, br", |
20 | 20 | "Accept-Language": "en-US,en;q=0.9", |
21 | | - "User-Agent": USER_AGENT, |
22 | 21 | "Cache-Control": "no-cache", |
23 | 22 | "Connection": "Upgrade", |
| 23 | + "Origin": "https://copilot.microsoft.com", |
| 24 | + "Pragma": "no-cache", |
| 25 | + "User-Agent": USER_AGENT, |
24 | 26 | } |
25 | 27 |
|
26 | 28 | KBLOB_HEADERS = { |
| 29 | + "Accept": "image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8", |
| 30 | + "Accept-Encoding": "gzip, deflate, br", |
27 | 31 | "Accept-Language": "en-US,en;q=0.5", |
28 | 32 | "Content-Type": "multipart/form-data", |
29 | | - "Referer": "https://www.bing.com/", |
| 33 | + "Referer": "https://copilot.microsoft.com/", |
| 34 | + "Sec-Ch-Ua": '"Microsoft Edge";v="120", "Chromium";v="120", "Not?A_Brand";v="8"', |
| 35 | + "Sec-Ch-Ua-Mobile": "?0", |
| 36 | + "Sec-Ch-Ua-Platform": "Windows", |
| 37 | + "Sec-Fetch-Dest": "empty", |
| 38 | + "Sec-Fetch-Mode": "cors", |
| 39 | + "Sec-Fetch-Site": "same-origin", |
30 | 40 | "User-Agent": USER_AGENT, |
| 41 | + "X-Edge-Shopping-Flag": "0", |
31 | 42 | } |
32 | 43 |
|
33 | | -BUNDLE_VERSION = "1.1342.3-cplt.7" |
| 44 | +BUNDLE_VERSION = "1.1381.12" |
34 | 45 |
|
35 | | -BING_CREATE_CONVERSATION_URL = ( |
36 | | - f"https://www.bing.com/turing/conversation/create?bundleVersion={BUNDLE_VERSION}" |
37 | | -) |
| 46 | +BING_CREATE_CONVERSATION_URL = f"https://edgeservices.bing.com/edgesvc/turing/conversation/create?bundleVersion={BUNDLE_VERSION}" |
38 | 47 | BING_GET_CONVERSATIONS_URL = "https://www.bing.com/turing/conversation/chats" |
39 | 48 | BING_CHATHUB_URL = "wss://sydney.bing.com/sydney/ChatHub" |
40 | | -BING_KBLOB_URL = "https://www.bing.com/images/kblob" |
41 | | -BING_BLOB_URL = "https://www.bing.com/images/blob?bcid=" |
| 49 | +BING_KBLOB_URL = "https://copilot.microsoft.com/images/kblob" |
| 50 | +BING_BLOB_URL = "https://copilot.microsoft.com/images/blob?bcid=" |
42 | 51 |
|
43 | 52 | DELIMETER = "\x1e" # Record separator character. |
0 commit comments