Skip to content

Commit 029fed6

Browse files
committed
🐞 fix: 修复英雄联盟更新公告
1 parent a439458 commit 029fed6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

routes/lol.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@ let updateTime = new Date().toISOString();
1818

1919
// 调用路径
2020
const url =
21-
"https://apps.game.qq.com/cmc/zmMcnTargetContentList?r0=jsonp&page=1&num=16&target=24&source=web_pc&r1=jQuery191002324053053181463_1687855508930&_=1687855508933";
21+
"https://apps.game.qq.com/cmc/zmMcnTargetContentList?r0=jsonp&page=1&num=16&target=24&source=web_pc";
2222

2323
// 数据处理
2424
const getData = (data) => {
2525
if (!data) return [];
2626
const dataList = [];
2727
try {
28-
const pattern = /jQuery191002324053053181463_1687855508930\((.*?)\)/s;
29-
const matchResult = data.match(pattern);
30-
const jsonObject = JSON.parse(matchResult[1])["data"].result;
28+
const match = data.match(/callback\((.*)\)/);
29+
const jsonObject = JSON.parse(match[1]).data.result;
3130
jsonObject.forEach((v) => {
3231
dataList.push({
3332
title: v.sTitle,

0 commit comments

Comments
 (0)