NewPipeExtractor
NewPipeExtractor copied to clipboard
YT Music: Playlist/Album extraction broken
So after I fixed every test in the extractor (#882) I noticed that YT seems to have changed the music extraction which results in some errors:

java.lang.AssertionError: Next page have errors
* Could not get url
* Could not get url
* Could not get url
* Could not get url
at org.schabi.newpipe.extractor.ExtractorAsserts.assertEmptyErrors(ExtractorAsserts.java:28)
at org.schabi.newpipe.extractor.services.DefaultTests.defaultTestMoreItems(DefaultTests.java:128)
at org.schabi.newpipe.extractor.services.DefaultListExtractorTest.testMoreRelatedItems(DefaultListExtractorTest.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
... (remove junit internal stack)
at java.lang.Thread.run(Thread.java:750)
Caused by: org.schabi.newpipe.extractor.exceptions.ParsingException: Could not get url
at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeMusicSearchExtractor$3.getUrl(YoutubeMusicSearchExtractor.java:554)
at org.schabi.newpipe.extractor.playlist.PlaylistInfoItemsCollector.extract(PlaylistInfoItemsCollector.java:17)
at org.schabi.newpipe.extractor.MultiInfoItemsCollector.extract(MultiInfoItemsCollector.java:86)
at org.schabi.newpipe.extractor.MultiInfoItemsCollector.extract(MultiInfoItemsCollector.java:48)
at org.schabi.newpipe.extractor.InfoItemsCollector.commit(InfoItemsCollector.java:104)
at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeMusicSearchExtractor.collectMusicStreamsFrom(YoutubeMusicSearchExtractor.java:501)
at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeMusicSearchExtractor.getPage(YoutubeMusicSearchExtractor.java:275)
at org.schabi.newpipe.extractor.services.DefaultTests.defaultTestMoreItems(DefaultTests.java:125)
... 91 more
After having a quick look I think the following was changed:
- Sometimes I get a "black" screen because the playlist is not found?

- The menu is different for some items:

- If you click a video it directs to a browse url which is then redirected to a playlist url

On the albums on which there are two items in the menu, the album could not be played too. The mix command provides the playlist (once you remove everything before the OLA[...] part), but the playlist is... private (when opened on the YouTube website, hence the 404 error when you try to access the playlist with the browse ID on YouTube Music)!
In my opinion there is nothing we can do about this, except changing the search query or waiting for YouTube to fix these issues.
I also encountered a similar problem, I was able to extract the youtube music playback link, but the playback failed due to authentication issues.
Can this be closed?
They both work in Piped (and the tests pass now): https://piped.video/results?search_query=test&filter=music_albums https://piped.video/results?search_query=test&filter=music_playlists