Equim-chan / mjai-reviewer

🔍🀄️ Review mahjong game log with mjai-compatible mahjong AI.
https://mjai.ekyu.moe
Apache License 2.0
1.03k stars 120 forks source link

Failed to download mahjong soul log #30

Closed yueclipse closed 3 years ago

yueclipse commented 3 years ago

Online page failed to read any mahjong soul url. Local build says cause by: get mahjong soul log: 503 Service Unavailable. The server is fine for normal players, could be the recent event update?

Equim-chan commented 3 years ago

Apparently, it seems the IP of the server used to download mjsoul logs (at tensoul.herokuapp.com) is banned by mjsoul (login error code 151). I can still download mjsoul logs locally using the same program so it should be the case.

yueclipse commented 3 years ago

So mjsoul started noticing the akochan public service? How to download the logs locally with the build from resource?

Equim-chan commented 3 years ago

It is a bit complex. Check this https://github.com/Equim-chan/tensoul

yueclipse commented 3 years ago

I wish I could help, but I'm not good at js and rust. Sadly Akochan couldn't review mjsoul now. Would be appreciated if you plan a fix on this.

Equim-chan commented 3 years ago

Sorry, I have no clue fixing this problem. Retrieving mjsoul logs require a login, so I deployed tensoul on heroku as a helper to login to mjsoul, retrieve the logs, and convert to tenhou's format so that the reviewer can work on it. Currently the IP of heroku is banned from logging in mjsoul, and several months ago I already have migrated it once (us -> eu). Right now both IPs are banned and there is nowhere to migrate again.

yueclipse commented 3 years ago

I am thinking running locally and use my own credential to log in mjsoul, but I don't know how to deploy tensoul on local and ask the reviewer to use it. Is it doable?

Equim-chan commented 3 years ago

In fact, you don't have to deploy it. You could download the log with command line.

$ cd tensoul
$ # set envs
$ # ...
$ node . MAHJONG_SOUL_LOG_ID > tenhou_log.json
$ akochan-reviewer -i tenhou_log.json -a ACTOR -e
yueclipse commented 3 years ago

Awesome, I am able to download the mjsoul log locally and have akochan review it. Thanks for the help!

Equim-chan commented 3 years ago

See https://github.com/Equim-chan/akochan-reviewer/blob/master/mjsoul.adoc.

yueclipse commented 3 years ago

9/28 mjsoul update probably failed the tensoul. I switched and your new method works well. Thank you.