-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Auto Redirecting Albums for LibRedirect #33
Comments
I'll see what I can do to change the url formatting, I've needed to change them for a long time but haven't got around to it. I'll reply soon once I fix it |
This will be interesting. Currently the reason Beatbump uses the ID's that it does is because they're the internal ID's for the releases. YTM does use the ID's Beatbump uses, but they do a redirect like this: https://music.youtube.com/browse/MPREb_HtX6bEyViGY That only uses one HTTP request though, so I need to figure out what exactly happens behind the scenes with that. As well as internal ID's, YouTube Music has "internal playlist ID's" too, so for releases that start with |
Okay, so here's what I've figured out. YTM initially links to But if you go to https://music.youtube.com/playlist?list=OLAK5uy_lseCZ03C0sqvERTr-GDpthp-ty48bqh3s -- it'll change the URL to https://music.youtube.com/browse/MPREb_HtX6bEyViGY, then back to the Example of what I mean: Here's where the link comes from in the HTML I don't know what they're doing, it's weird but then again everything YTM does is weird. Is there any way, on the extension side of things, you could fetch the HTML (https://music.youtube.com/playlist?list=OLAK5uy_lseCZ03C0sqvERTr-GDpthp-ty48bqh3s) and parse out the ID? Here's an example Codepen of what I mean. For the Codepen to work, you'll need a CORS extension or a CORS proxy since it's directly fetching the YTM page. I'd do it on the Beatbump side of things, but I'm already pushing the memory limits it seems. The Regular Expression I used was For further clarification, once you parse out the browseId, (for example: MPREb_HtX6bEyViGY), you could then redirect to Beatbump's URL https://beatbump.ml/release?id=MPREb_HtX6bEyViGY |
I understood what you meant. I can make the extension fetch the id and then connect to Beatbump but this will defeat the whole purpose of the extension (to prevent connecting directly to those websites). Anyone who doesn't use the extension and just replaces YT Music url with Beatbump won't be able to do that and get their Albums on Beatbump. Some people just use https://einaregilsson.com/redirector/ rather than my extension and they won't be able to do that. |
My apologies, I was all over the place earlier. How's this (for now at least, til I can figure out something better)? Any URLs that start as 'OLAK5...' for releases (singles/albums) would just need VL in front ? It lacks the header info as well as OG data, which really isn't too important, but at least it would allow you guys to have it integrated and wouldn't need to worry about it |
I added that logic before for playlists. So, it's now working without even modifying my code.
I see. Thanks! Hopefully this project will get more popular. |
We're working on LibRedirect for auto redirecting YT Music links to your project. I didn't success in redirecting albums.
The
id
on the beatbump url is just weird. I didn't find it anywhere in the YT Music url.Albums
YT music: https://music.youtube.com/playlist?list=OLAK5uy_mOa4i-kkW9ZA9jU2REQR1fB2ZNWhdDCv0
Beatbump: https://beatbump.ml/release?id=MPREb_3DURc4yEUtD
YT Music: https://music.youtube.com/playlist?list=OLAK5uy_n6OHVllUZUCnlIY1m-gUaH8uqkN3Y-Ca8
Beatbump: https://beatbump.ml/release?id=MPREb_QygdC0wEoLe
Singles
YT Music: https://music.youtube.com/playlist?list=OLAK5uy_n-9HVh3cryV2gREZM9Sc0JwEKYjjfi0dU
Beatbump: https://beatbump.ml/release?id=MPREb_evaZrV1WNdS
The text was updated successfully, but these errors were encountered: