fix: 修复Poe formkey失效的问题

This commit is contained in:
ikechan8370 2023-05-14 13:24:24 +08:00
parent 1a94d92943
commit 15f579aab8
2 changed files with 24 additions and 4 deletions

View file

@ -4,7 +4,7 @@ import { readFileSync, writeFile } from 'fs'
const scrape = async (pbCookie, proxy) => {
let option = { headers: { cookie: `${pbCookie}` } }
if (proxy) {
option.proxy = proxy
option.agent = proxy
}
const _setting = await fetch(
'https://poe.com/api/settings',
@ -24,7 +24,7 @@ const scrape = async (pbCookie, proxy) => {
const getUpdatedSettings = async (channelName, pbCookie, proxy) => {
let option = { headers: { cookie: `${pbCookie}` } }
if (proxy) {
option.proxy = proxy
option.agent = proxy
}
const _setting = await fetch(
`https://poe.com/api/settings?channel=${channelName}`,