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