-
-
Notifications
You must be signed in to change notification settings - Fork 518
Extractor for youtube mix (auto-generated playlist) #253
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
Conversation
-New YoutubeMixPlaylistExtractor, that extracts from a mix (auto-generated playlist). -The url has the format of "youtube.com/watch?v=videoID&playlistID", where playlistID always starts with "RD" and usually followed by the videoID. -Change YoutubePlaylistLinkHandlerFactory to create a linkhandler with the given url if it is a mix. -Change YoutubeService to return YoutubeMixPlaylistExtractor if the url is a mix.
| @Override | ||
| public String getUploaderName() { | ||
| //Youtube mix are auto-generated | ||
| return ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have that YouTube string marked in you image when i open the site.
But that could also be changed in the app, since there was already a PR to deal with playlists without uploader. Just the String resource would need to be changed.
TeamNewPipe/NewPipe#2724
| } | ||
|
|
||
| @Override | ||
| public String getUploaderAvatarUrl() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As they are generated by YouTube, shouldn't you return YouTube logo (or censored version)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably need to hardcode the url, since i can't find one in the crawled html.
Another way would be to save it as a resource in the app and load from there, but that will probably cause license issues.
This occurs when sharing a mix from the official youtube app.
|
With #258 coming soon, I will probably need to adjust my code to the new user agent. Before that I would like to know if the general approach is ok. |
|
@XiangRongLin the general approach seems good to me. But ask @wb9688 to be sure ;-) |
|
An idea on how to make it endless would be requesting a new mix from YouTube with the last video as the starting point. I'll check out on the weekend, if it works and whether there are too many duplicates. |

closes TeamNewPipe/NewPipe#2895
Problem
As describes in the issue in the NewPipe repo, when sharing a youtube mix to newpipe, it crashes. Reason for that is that the linkhandler receives (1)"https://www.youtube.com/watch?v=QXCE3Betyug&list=RDQXCE3Betyug" and converts it to (2)"https://www.youtube.com/playlist?list=RDQXCE3Betyug", which loads a basicly empty page.
Changes
Testing
I tested the changes on my android 10 and 7.1 devices and a 5.0 emulator, by:
This doesn't require changes in the app, besides updating the extractor dependency.
app-debug.zip
What's missing
Notes
All mix urls that i found so far are like that, where the playlist id is "RD" + video id of the first video. I assume RD stands for radio (Playlist ids start with "PL" instead)