unitunes
unitunes copied to clipboard
Support a different YouTube playlist URL
First of all, thank you for this great piece of software.
I couldn't get the right YT playlist URL format at first, then I noticed the supported URL format is different. The one I got from my address bar when browsing is as follows:
https://music.youtube.com/browse/<playlist-id>
Alternatively, as we have to specify the service anyway, wouldn't it be better if we just enter the playlist ID?
I usually click the share button on the playlist to get the url, which is why its this way. Adding more parsing options would be good.
Using the share button also results in the following error.
Traceback (most recent call last):
File "/path/clones/unitunes/unitunes/gui/engine.py", line 109, in _process_queue
job.execute()
File "/path/clones/unitunes/unitunes/gui/engine.py", line 66, in execute
self.pm.pull_playlist(
File "/path/clones/unitunes/unitunes/main.py", line 205, in pull_playlist
remote_metadata = service.pull_metadata(uri)
File "/path/clones/unitunes/unitunes/services/ytm.py", line 224, in pull_metadata
res = self.wrapper.get_playlist(uri.uri)
File "/path/clones/unitunes/unitunes/services/ytm.py", line 45, in get_playlist
return self.ytm.get_playlist(*args, **kwargs)
File "/path/Library/Caches/pypoetry/virtualenvs/unitunes-it616VEz-py3.10/lib/python3.10/site-packages/ytmusicapi/mixins/playlists.py", line 68, in get_playlist
results = nav(response,
File "/path/Library/Caches/pypoetry/virtualenvs/unitunes-it616VEz-py3.10/lib/python3.10/site-packages/ytmusicapi/parsers/utils.py", line 155, in nav
raise err
File "/path/Library/Caches/pypoetry/virtualenvs/unitunes-it616VEz-py3.10/lib/python3.10/site-packages/ytmusicapi/parsers/utils.py", line 149, in nav
root = root[k]
URL:
https://music.youtube.com/playlist?list=<playlist-id>&feature=share
Removing the feature
parameter seems to sort it. I suppose we're not parsing the URL properly. I would suggest using urllib.parse.
I apologise as I am unable to contribute as I will be traveling for the next 2 weeks.