From 23d102fe67db7381da511d6d4ece4423f0120c3d Mon Sep 17 00:00:00 2001 From: mio <10892119+biuuu@users.noreply.github.com> Date: Sun, 31 Mar 2024 15:01:35 +0800 Subject: [PATCH] fix: sometimes appid error --- package.json | 2 +- src/main/getData.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5180ba4..13fa833 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "star-rail-warp-export", - "version": "0.1.6", + "version": "0.1.7", "main": "./dist/electron/main/main.js", "author": "biuuu ", "homepage": "https://github.com/biuuu/star-rail-warp-export", diff --git a/src/main/getData.js b/src/main/getData.js index 9d71dd9..96db66c 100644 --- a/src/main/getData.js +++ b/src/main/getData.js @@ -141,7 +141,7 @@ const readLog = async () => { const gamePathMch = logText.match(/\w:\/.*?\/StarRail_Data\//i) if (gamePathMch) { const [cacheText, cacheFile] = await getCacheText(gamePathMch[0]) - const urlMch = cacheText.match(/https.+?&auth_appid=webview_gacha&.+?authkey=.+?&game_biz=hkrpg_.+?&plat_type=pc/g) + const urlMch = cacheText.match(/https[^?]+?\?[^?]+?&auth_appid=webview_gacha&.+?authkey=.+?&game_biz=hkrpg_.+?&plat_type=pc/g) if (urlMch) { cacheFolder = cacheFile.replace(/Cache_Data[/\\]data_2$/, '') return getLatestUrl(urlMch)