mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-08-04 12:44:33 +08:00
Change "chat.openai.com" to "chatgpt.com"
This commit is contained in:
@@ -63,10 +63,10 @@ export async function getRequirements(accessToken) {
|
||||
export async function getArkoseToken(config) {
|
||||
if (!config.chatgptArkoseReqUrl)
|
||||
throw new Error(
|
||||
t('Please login at https://chat.openai.com first') +
|
||||
t('Please login at https://chatgpt.com first') +
|
||||
'\n\n' +
|
||||
t(
|
||||
"Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.",
|
||||
"Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.",
|
||||
),
|
||||
)
|
||||
const arkoseToken = await fetch(
|
||||
@@ -87,7 +87,7 @@ export async function getArkoseToken(config) {
|
||||
t('Failed to get arkose token.') +
|
||||
'\n\n' +
|
||||
t(
|
||||
"Please keep https://chat.openai.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.",
|
||||
"Please keep https://chatgpt.com open and try again. If it still doesn't work, type some characters in the input box of chatgpt web page and try again.",
|
||||
),
|
||||
)
|
||||
return arkoseToken
|
||||
@@ -229,7 +229,7 @@ export async function generateAnswersWithChatgptWebApi(port, question, session,
|
||||
let cookie
|
||||
let oaiDeviceId
|
||||
if (Browser.cookies && Browser.cookies.getAll) {
|
||||
cookie = (await Browser.cookies.getAll({ url: 'https://chat.openai.com/' }))
|
||||
cookie = (await Browser.cookies.getAll({ url: 'https://chatgpt.com/' }))
|
||||
.map((cookie) => {
|
||||
return `${cookie.name}=${cookie.value}`
|
||||
})
|
||||
|
||||
@@ -15,12 +15,12 @@ export async function getChatGptAccessToken() {
|
||||
if (userConfig.accessToken) {
|
||||
return userConfig.accessToken
|
||||
} else {
|
||||
const cookie = (await Browser.cookies.getAll({ url: 'https://chat.openai.com/' }))
|
||||
const cookie = (await Browser.cookies.getAll({ url: 'https://chatgpt.com/' }))
|
||||
.map((cookie) => {
|
||||
return `${cookie.name}=${cookie.value}`
|
||||
})
|
||||
.join('; ')
|
||||
const resp = await fetch('https://chat.openai.com/api/auth/session', {
|
||||
const resp = await fetch('https://chatgpt.com/api/auth/session', {
|
||||
headers: {
|
||||
Cookie: cookie,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user