Description
I've read the documentation
- I'm running the latest version of Tube Archivist and have read the release notes.
- I have read the how to open an issue guide, particularly the bug report section.
Operating System
Linux (Fedora)
Your Bug Report
Describe the bug
Some types of public playlists don't seem to be supported when they have a longer playlist ID length than other standard playlists.
Steps To Reproduce
I am trying to subscribe to these playlists:
https://www.youtube.com/playlist?list=OLAK5uy_mMdR_4JhLvaBUm_r3r4HfnrkIbZM59eDI
https://www.youtube.com/playlist?list=OLAK5uy_kOjcMYd-zFhGK7iPzOb1m2-3ituAZSNe0
https://www.youtube.com/playlist?list=OLAK5uy_ms09pWs_aclONc04rGC273Cs406CEqyVU
When adding this playlist as a full URL or just the playlist ID, TA returns a ValueError
from parser.py not a valid id_str
. source
Looking at the code I thought it'd be easy enough to add a '41' to the if conditions, so:
elif len_id_str in (41, 34, 26, 18) or id_str.startswith("TA_playlist_"):
item_type = "playlist"
But this doesn't work - as TA now returns a TypeError from generic.py: TypeError('can only concatenate str (not "NoneType") to str')
source
Expected behavior
I would expect to be able to download any publicly-available Playlist URL.
If I pass the playlist URL to yt-dlp, it is able to parse the URL correctly, fetch all videos and then begin downloading.
Relevant log output
[2024-08-23 19:42:01,886: ERROR/ForkPoolWorker-2] Task extract_download[1a4f72eb-fb4c-4cd3-ad82-ae310b11d3aa] raised unexpected: ValueError('not a valid id_str: OLAK5uy_ms09pWs_aclONc04rGC273Cs406CEqyVU')
Traceback (most recent call last):
File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 453, in trace_task
R = retval = fun(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 736, in __protected_call__
return self.run(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/home/tasks.py", line 157, in extrac_dl
to_add = Parser(youtube_ids).parse()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/home/src/ta/urlparser.py", line 29, in parse
identified = self._find_valid_id(url)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/home/src/ta/urlparser.py", line 102, in _find_valid_id
raise ValueError(f"not a valid id_str: {id_str}")
Anything else?
This type of playlist seems to be some kind of externally-managed playlist, and in investigating this issue seems to be common with artists/groups that have a collated 'Music Videos' playlist, but I have also found examples where it's just an album and no videos.
eg: https://www.youtube.com/playlist?list=OLAK5uy_mLDB02_0i0XhUYWkqNQxcI8G70l9ECNfU
Activity