Open zmwangx opened 5 years ago
Server component is done. Just need to write the client now.
API is served at https://kvm48.momo0v0.club/api/graphql. Why not kvm48.snh48live.org? See https://github.com/SNH48Live/KVM48/tree/master/server#infrequently-asked-questions.
As I pointed out in the initial assessment, performance VODs lost the subtitle property and it is now impossible to e.g. tell birthday stages from regular stages just looking at the API. To prove my point, for https://live.48.cn/Index/invedio/club/1/id/2772:
The important differentiator here (莫寒生日公演) is only encoded in https://source.48.cn/mediasource/live/1555670301617L2slw8tD09.jpg. It seems all is lost.
That's not entirely the case though. If one takes a look at https://live.48.cn/Index/main/club/1, apparently VODs as well as future livestreams still carry subtitles. So, they have it, but they're not exposing it in the API or the app. Makes you wonder which idiot(s) thought this is a good idea.
Anyway, there are obviously two ways forward:
Client-side HTML scraping and parsing is too unwieldy and prone to breakage, especially in this case. Server-side scraping and parsing is technically superior (especially in terms of robustness and client performance), but I do need to introduce a server component (technically easy) and become a middle man. Since I already use my own server for update checks, this doesn't seem too morally problematic; keep in mind though that this does in principle open up a fair bit more data collection opportunities, but since perf mode granularity is limited to one group, hopefully this isn't too creepy. As always an opt out switch will be offered.
In conclusion, I'm going with the server-side solution. I might want to release the rough working version first though.