🐞 fix: 修复英雄联盟更新公告
This commit is contained in:
parent
a4394588c1
commit
029fed603b
@ -18,16 +18,15 @@ let updateTime = new Date().toISOString();
|
|||||||
|
|
||||||
// 调用路径
|
// 调用路径
|
||||||
const url =
|
const url =
|
||||||
"https://apps.game.qq.com/cmc/zmMcnTargetContentList?r0=jsonp&page=1&num=16&target=24&source=web_pc&r1=jQuery191002324053053181463_1687855508930&_=1687855508933";
|
"https://apps.game.qq.com/cmc/zmMcnTargetContentList?r0=jsonp&page=1&num=16&target=24&source=web_pc";
|
||||||
|
|
||||||
// 数据处理
|
// 数据处理
|
||||||
const getData = (data) => {
|
const getData = (data) => {
|
||||||
if (!data) return [];
|
if (!data) return [];
|
||||||
const dataList = [];
|
const dataList = [];
|
||||||
try {
|
try {
|
||||||
const pattern = /jQuery191002324053053181463_1687855508930\((.*?)\)/s;
|
const match = data.match(/callback\((.*)\)/);
|
||||||
const matchResult = data.match(pattern);
|
const jsonObject = JSON.parse(match[1]).data.result;
|
||||||
const jsonObject = JSON.parse(matchResult[1])["data"].result;
|
|
||||||
jsonObject.forEach((v) => {
|
jsonObject.forEach((v) => {
|
||||||
dataList.push({
|
dataList.push({
|
||||||
title: v.sTitle,
|
title: v.sTitle,
|
||||||
|
Loading…
Reference in New Issue
Block a user