From f8745c2ed3846a2fce168ced95e9aaf09ae8ef9b Mon Sep 17 00:00:00 2001 From: giscafer Date: Wed, 4 Sep 2024 21:53:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=B4=E6=97=B6=E8=A7=A3=E5=86=B3toke?= =?UTF-8?q?n=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/explorer/stockService.ts | 5 ++++- src/extension.ts | 2 -- src/output/flash-news/impl/Jin10FlushService.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/explorer/stockService.ts b/src/explorer/stockService.ts index 2df14e7b..85d7380e 100644 --- a/src/explorer/stockService.ts +++ b/src/explorer/stockService.ts @@ -36,6 +36,7 @@ export default class StockService extends LeekService { const param: string = cookies.filter((key) => key.includes('xq_a_token'))[0] || ''; this.token = param.split(';')[0] || ''; + console.log("🚀 ~ StockService ~ getToken ~ this.token:", this.token); return this.token; } @@ -420,7 +421,9 @@ export default class StockService extends LeekService { headers: { ...randHeader(), Referer: 'https://stock.xueqiu.com/', - Cookie: await this.getToken(), + // 雪球token规则变化,临时解决 + // Cookie: await this.getToken(), + "cookie": "acw_tc=2760826017254576052523235e0b5e24ba6432d19252e786e33ed3e0ee2db8; acw_sc__v2=66d864c5c68f742d150271b6da3a371072df5bc6; xq_a_token=49c5e355d2fc1b871fde601c659cf9ae1457a889; xqat=49c5e355d2fc1b871fde601c659cf9ae1457a889; xq_r_token=250d5a132310b89c6cf1193e084989736506a297; xq_id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1aWQiOi0xLCJpc3MiOiJ1YyIsImV4cCI6MTcyNzkxNjc3OCwiY3RtIjoxNzI1NDU3NTg4MjU3LCJjaWQiOiJkOWQwbjRBWnVwIn0.ggqWWe7vvq1GcgRDS6e6abMOSiu6EqfW84QXQjeYQrLuja8zFA-KGrQBlcH6vV74bL6_NR1qROWqKp5fF7acOYagqLEUIXH4xG9M_Pf_EvscNzcp9IitW-0a5CEivezAIoms_ajKpEOp-toXQq7aOG4KfNw6Paktzr4nlrBXtmuXb9V0eaIFXnQAhjVK2_2-X351YGYfUesT0io22BYJUus037if8O_H3GmSF9xWTFcBWZ3seQl2wG_w1fwVhzP1SzcjiIzEEIU8QXttFMMUmUkG8SWsFV18JFKYEu618ZTItxE6-ijxL5Dk0oKt8MV58uz9chQ4o4vlukd_-UguTA; cookiesu=411725457605875; u=411725457605875; Hm_lvt_1db88642e346389874251b5a1eded6e3=1725457610; HMACCOUNT=2546BEF12550F4D4; device_id=a0814ba472ea428d8488ca48833b7db8; smidV2=2024090421465125ea22186efc27f3de9c33bd7df8002b00f1792dfda7b5c90; is_overseas=0; Hm_lpvt_1db88642e346389874251b5a1eded6e3=1725457619; .thumbcache_f24b8bbe5a5934237bbc0eda20c1b6e7=gyo2b8VGfAxa5SfTipuQx8ezwddhs93f7FW74dnOzyirEbx849B+Ff3Z7VnhDgFgOEPO8rw+tAuePz+dXrbBXQ%3D%3D; ssxmod_itna=eqRxyDciDQG=Dtmx0dGQDHFySC7fYDnG7nD8eK9cx0yDReGzDAxn40iDt=a5/j7OxAPYi0424Dun2Dh3UKWOhLINTInBw5jDbxiTD4q07Db4GkDAqiOD7kRwoD435GwD0eG+DD4DWtXI=D7rXgUkNXWq=07TNDmb=uDGQcDiU3xi5Z/L=/8eGWnqGfDDoDYbNSAeQDGkKDbTQDITXKb8hxqcj7Ha=2CPDuCa6YcqDLfQFHxB=ulmPSWFODtw=cnnQ2UAX=OuTd4hp3WxA3GuAxb8GY4rEKWhZxf6AifG+3fB3ST3e4Gw+UI04DDWDEd4D===; ssxmod_itna2=eqRxyDciDQG=Dtmx0dGQDHFySC7fYDnG7nD8eK9xn9S4DsLDwxqjKG7d4D==", }, }); const { data, error_code, error_description } = resp.data; diff --git a/src/extension.ts b/src/extension.ts index 1524da71..3b32bc0b 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -258,11 +258,9 @@ function setGlobalVariable() { // 临时解决3.10.1~3.10.3 pr产生的分组bug const leekFundExt = extensions.getExtension('giscafer.leek-fund'); const currentVersion = leekFundExt?.packageJSON?.version; - console.log("🚀 ~ LeekFund ~ version:", currentVersion); if (compare(currentVersion, '3.9.2', '>=') && compare(currentVersion, '3.10.3', '<=')) { const arr = LeekFundConfig.getConfig('leek-fund.stocks') || []; const stockList = uniq(compact(flattenDeep(arr))); - console.log("🚀 ~ leek-fund.stocks ~ arr:", stockList) LeekFundConfig.setConfig('leek-fund.stocks', stockList); } } diff --git a/src/output/flash-news/impl/Jin10FlushService.ts b/src/output/flash-news/impl/Jin10FlushService.ts index 8993fc98..24bf9f37 100644 --- a/src/output/flash-news/impl/Jin10FlushService.ts +++ b/src/output/flash-news/impl/Jin10FlushService.ts @@ -44,7 +44,7 @@ export default class Jin10FlushService extends NewsFlushServiceAbstractClass { ws.addEventListener('error', (err: any) => { globalState.telemetry.sendEvent('error:jin10Service', { error: err }); - console.log("🚀 ~ 金十快讯 ws 错误:Jin10FlushService ~ ws.addEventListener ~ err:", err) + console.log("🚀 ~ 金十快讯 ws 错误:Jin10FlushService ~ ws.addEventListener ~ err:", err); }); ws.addEventListener('close', () => {