fix: sometimes appid error

This commit is contained in:
mio 2024-03-31 15:01:35 +08:00
parent e307d21bb2
commit 23d102fe67
2 changed files with 2 additions and 2 deletions

@ -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 <https://github.com/biuuu>",
"homepage": "https://github.com/biuuu/star-rail-warp-export",

@ -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)