genshin.py
genshin.py copied to clipboard
Fixed getting authkey not working after genshin 3.0 update
It took so long to make everything correct 💀
Might be a good idea to support something similar to the approach for cn versions https://github.com/biuuu/genshin-wish-export/blob/main/src/main/getData.js#L155-L164
const logText = await fs.readFile(`${userPath}/AppData/LocalLow/miHoYo/${name}/output_log.txt`, 'utf8')
const gamePathMch = logText.match(/\w:\/.+(GenshinImpact_Data|YuanShen_Data)/)
if (gamePathMch) {
const cacheText = await fs.readFile(path.join(gamePathMch[0], '/webCaches/Cache/Cache_Data/data_2'), 'utf8')
const urlMch = cacheText.match(/https.+?game_biz=hk4e_\w+/g)
if (urlMch) {
return urlMch[urlMch.length - 1]
}
}
Please run nox mate, I can't merge with lint errors.
Haven't looked here for a while so I haven't seen message before