Skip to content

Commit

Permalink
fix: 临时解决token问题
Browse files Browse the repository at this point in the history
  • Loading branch information
giscafer committed Sep 4, 2024
1 parent 5b3fa1f commit f8745c2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/explorer/stockService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/output/flash-news/impl/Jin10FlushService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit f8745c2

Please sign in to comment.