Skip to content

Instantly share code, notes, and snippets.

@MadeBaruna
Last active November 16, 2024 19:39
Show Gist options
  • Save MadeBaruna/1d75c1d37d19eca71591ec8a31178235 to your computer and use it in GitHub Desktop.
Save MadeBaruna/1d75c1d37d19eca71591ec8a31178235 to your computer and use it in GitHub Desktop.
Get Genshin Impact wish history link

Updated for 4.6

Thanks to @jogerj and @PrimeCicada for the method! Original script: https://gist.github.com/jogerj/0339e61a92e0de2e360c5212a94854e8

Thanks to @SleepingPanda for 3.8 change info

How to use

Open powershell, then copy paste this script:

Global:

iex "&{$(irm https://gist.githubusercontent.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/702e34117b07294e6959928963b76cfdafdd94f3/getlink.ps1)} global"

China:

iex "&{$(irm https://gist.githubusercontent.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/702e34117b07294e6959928963b76cfdafdd94f3/getlink.ps1)} china"
@marikawacch
Copy link

https://webstatic-sea.hoyoverse.com/genshin/event/e20190909gacha-v2/index.html?win_mode=fullscreen&authkey_ver=1&sign_type=2&auth_appid=webview_gacha&init_type=301&gacha_id=666e99c499de824cf10211511d3c2ad3b48cf38d&timestamp=1673997965&lang=ja&device_type=pc&game_version=OSRELWin3.4.0_R12875869_S12901190_D13021296&plat_type=pc&region=os_asia&authkey=lTW%2fFdSYCJPo85m%2bPESmZ4xCjwsfJBWHpI%2fXOAHYKaE8iv%2fgsHR%2bJJam%2bUHaKBIG7B0nVNkWcTnJer7c1j53B%2fJ2L8hXgA0LhNxj0VzuZpW%2faEAl8pOI3e%2bCn%2bCUgs0AxSvA4BJaxCNDBIJ9S8b8UTue5igLGzGR9GOf78Te7HhwZ%2fkhJWAB4A9S0fTfYDjjKchwYfSt%2ba8haNIAfXK%2f0OhnbBye3%2b4SiOOl%2fHb%2fpZl7zxWMvmokQEkY1PYqxwIPnqYdbh80Knh%2fAG%2bKuy%2fQn2JjD8v14l7r3LSVK%2fs02uchlh%2fDede6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Jm0t%2fB9OcoRCpFDrnJJIksxoREKjH8QkV9w%3d%3d&game_biz=

@tahakhany
Copy link

can you change this last line:

Write-Host "Link copied to clipboard, paste it back to paimon.moe" -ForegroundColor Green

into something like:

Write-Host "Link copied to clipboard, paste it back to https://paimon.moe" -ForegroundColor Green

so that PowerShell would recognize it as a link?
I guess it'll make it easier to go into the site.
Thanks.

@SleepingPanda
Copy link

SleepingPanda commented Jul 5, 2023

Looks like Mihoyo changed something. I'm unable to get the wish history link from %gamedir%\GenshinImpact_Data\webCaches\Cache\Cache_Data\data_2 .
Edit: It seems to be moved to %gamedir%\GenshinImpact_Data\webCaches\2.13.0.1\Cache\Cache_Data\data_2

@sxpso
Copy link

sxpso commented Jul 5, 2023

For anybody who needs to import their wish history feel free to use https://gist.github.com/mimicate/288c9a092daea534b4843f551f675c2e

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex "&{$((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/mimicate/288c9a092daea534b4843f551f675c2e/raw/8045364f337c536b1a28a796ef4416e26e3b4cad/getlink.ps1'))} global"

@code2me
Copy link

code2me commented Jul 5, 2023

For anybody who needs to import their wish history feel free to use https://gist.github.com/mimicate/288c9a092daea534b4843f551f675c2e

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex "&{$((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/mimicate/288c9a092daea534b4843f551f675c2e/raw/8045364f337c536b1a28a796ef4416e26e3b4cad/getlink.ps1'))} global"

@Mimicate Thanks, This is working perfectly.

@cytsai1008
Copy link

On game ver 4.0, they changed the webcaches dir from 2.13.0.1 into 2.15.0.0

@jogerj
Copy link

jogerj commented Aug 20, 2023

$webcachePath = Resolve-Path "$gamedir/webCaches"
$cacheVerPath = Get-Item (Get-ChildItem -Path $webcachePath | Sort-Object LastWriteTime -Descending | Select-Object -First 1).FullName
$cachefile = Resolve-Path "$cacheVerPath/Cache/Cache_Data/data_2"

This should resolve the issue with changing version numbers for the cache path

@TheKing-OfTime
Copy link

Looks like links from How to use in README.md is outdated.

@jogerj
Copy link

jogerj commented Aug 25, 2023

Yes, link should be replaced with https://gist.github.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/getlink.ps1 -> this will always point to latest version of file

@My1
Copy link

My1 commented Sep 3, 2023

someone have archives of older versions? I think MiHoYoSDK, Version=2.15.0.0, in the resources.assets may be helpful

@Cayahuanca
Copy link

In my environment, it seems that the webCaches folder specified on line 49 of this script has changed from 2.15.0.0 to 2.16.0.0 with the 4.1.0 update.

4.0.x
$cachefile = "$gamedir/webCaches/2.15.0.0/Cache/Cache_Data/data_2"

4.1.0
$cachefile = "$gamedir/webCaches/2.16.0.0/Cache/Cache_Data/data_2"

@Jerit3787
Copy link

Yes, link should be replaced with https://gist.github.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/getlink.ps1 -> this will always point to latest version of file

This method by @jogerj should be used to get updated link! Link in the paimon.moe needs to be updated

@RedContritio
Copy link

RedContritio commented Apr 24, 2024

at "README.md", the code line should be

Global:

iex "&{$(irm https://gist.githubusercontent.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/702e34117b07294e6959928963b76cfdafdd94f3/getlink.ps1)} global"

China:

iex "&{$(irm https://gist.githubusercontent.com/MadeBaruna/1d75c1d37d19eca71591ec8a31178235/raw/702e34117b07294e6959928963b76cfdafdd94f3/getlink.ps1)} china"

you have missed the quote " at line ends.


this two commands not work now, I refered to the available version by @jogerj, with command iex (irm 'https://gist.githubusercontent.com/jogerj/0339e61a92e0de2e360c5212a94854e8/raw/get_wish_url_from_cache.ps1')

@Nats-ji
Copy link

Nats-ji commented Apr 24, 2024

cn server api host changed to $apiHost = "public-operation-hk4e.mihoyo.com"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment