Skip to content

Commit

Permalink
修复正则取出来的链接不包含账号导致的历史数据获取不到
Browse files Browse the repository at this point in the history
  • Loading branch information
Guo authored and EtherealAO committed May 13, 2024
1 parent 07cd108 commit d31c100
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/main/getData.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,18 @@ const readLog = async () => {
.split(/\r?\n/)
.reverse();

const url_reg = "\"k\":\"gacha_record_url\",\"v\":\"(.+?)\"";
var addr = undefined;
logText.forEach((value, index, array) => {
if (addr)
return;
var reg_result = value.match(url_reg);
if (reg_result)
// const url_reg = "\"k\":\"gacha_record_url\",\"v\":\"(.+?)\"";
const url_reg = '"gacha_record_url":"(.+?)"';
let addr = undefined;
for (let value of logText) {
const reg_result = value.match(url_reg);
if (reg_result) {
addr = reg_result[1];
});
break;
}
}

if (!addr)
{
if (!addr) {
throw Error("Url not found");
}
// console.log(addr);
Expand Down

0 comments on commit d31c100

Please sign in to comment.