-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Can you add an option to set the default lyrics source for Japan? #243
Comments
only if someone interested in it opens a PR |
So there's no official API, so reverse engineering is required. Inspecting network requests, lyrics are gotten from
So, X-CSRF-Token is easy, for some reason, it can just be extracted from here Also, some useful stuff I found: I am trying to see if the app is the same, the problem is its not available in US on iOS, and I don't have an Android so I have to use an emulator, but then the app doesn't trust the MITMProxy CA cert... augggghhh... |
Ok, Good News! For the cookie, you only need the Also It can access the website to be issued the cookie, and extract it. Using that same session extract X-CSRF-Token from the pl-lib.js, so that they match each other. Then perform the POST request, parse the JSON, decode the base64, and print each lyric. I will now work on reverse engineering the search function, convert it all to Swift, and try implementing it. |
So I had to do some hacky things because the search request sends back a full webpage, so it has to scrape it with regex, hopefully, they don't update their site often (by the looks of it they don't) but I got it working, it does work with Genius FallBack too. They do apparently have time synced in their app, but I couldn't get it to work with MITMProxy, to see how it's done, I may add it in the future if I can figure it out. |
Thank you for all the trial and error. I hope that feature will be implemented someday. |
@krono244 @whoeevee @asdfzxcvbn |
implemented with 4e6bf27 |
The default lyrics sources in Japan are not Musixmatch, Genius, or LRCLIB, so I often have trouble finding the lyrics I need. In Japan, the default source is PetitLyrics(プチリリ). Could you add an option to retrieve lyrics from PetitLyrics(プチリリ)? I would appreciate your consideration.
The text was updated successfully, but these errors were encountered: