mirror of
https://github.com/earthjasonlin/star-rail-warp-export.git
synced 2025-07-05 06:00:15 +08:00
fix: URL pattern match failed (#91)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "star-rail-warp-export",
|
||||
"version": "0.1.13",
|
||||
"version": "0.1.14",
|
||||
"main": "./dist/electron/main/main.js",
|
||||
"author": "biuuu <https://github.com/biuuu>",
|
||||
"homepage": "https://github.com/biuuu/star-rail-warp-export",
|
||||
|
@ -161,7 +161,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_/g)
|
||||
if (urlMch) {
|
||||
cacheFolder = cacheFile.replace(/Cache_Data[/\\]data_2$/, '')
|
||||
return getLatestUrl(urlMch)
|
||||
@ -215,13 +215,13 @@ const getGachaLogs = async ({ name, key }, queryString) => {
|
||||
let endId = '0'
|
||||
const url = `${apiDomain}/common/gacha_record/api/getGachaLog?${queryString}`
|
||||
do {
|
||||
if (page % 10 === 0) {
|
||||
sendMsg(i18n.parse(text.fetch.interval, { name, page }))
|
||||
await sleep(1)
|
||||
}
|
||||
// if (page % 10 === 0) {
|
||||
// sendMsg(i18n.parse(text.fetch.interval, { name, page }))
|
||||
// await sleep(1)
|
||||
// }
|
||||
await sleep(0.3)
|
||||
sendMsg(i18n.parse(text.fetch.current, { name, page }))
|
||||
res = await getGachaLog({ key, page, name, url, endId, retryCount: 5 })
|
||||
await sleep(0.3)
|
||||
logs = res?.list || []
|
||||
if (!uid && logs.length) {
|
||||
uid = logs[0].uid
|
||||
|
Reference in New Issue
Block a user