tubearchivist / tubearchivist

Your self hosted YouTube media server

Home Page:https://www.tubearchivist.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: cannot refresh watch later playlist

malfroid opened this issue · comments

I've read the documentation

Operating System

Docker on Proxmox

Your Bug Report

Describe the bug

After installing TubeArchivist last year, I added my Watch later playlist and subscribed.

I was unable to refresh my "Watch later" playlist by clicking the "Rescan subscriptions" button on the Downloads page since December. According to the TubeArchivist interface, it has 12 videos. In reality, it now has 22 videos.

Example video showing the problem:

Screen.Recording.2024-01-16.at.20.05.04.mov

I tried to delete and re-add the playlist via the URL https://www.youtube.com/playlist?list=WL, but now get an error:

Task failed: WL: failed to extract data

Screen.Recording.2024-01-16.at.22.37.04.mov

Steps To Reproduce

Add watch later playlist https://www.youtube.com/playlist?list=WL

Expected behavior

Watch later playlist can be added and refreshes when I click on the "Rescan subscriptions" button on the Downloads page.

Relevant log output

[2024-01-16 22:30:52,169: WARNING/ForkPoolWorker-4] 66e58a52-1104-42a5-b4cf-730afed04c6e return callback
https://www.youtube.com/playlist?list=WL
[2024-01-16 22:35:53,063: INFO/MainProcess] Task subscribe_to[79d3131a-8b23-4d5d-9c3a-d8ac674003c2] received
[2024-01-16 22:35:53,064: WARNING/ForkPoolWorker-4] subscribe_to create callback
[2024-01-16 22:35:53,094: WARNING/ForkPoolWorker-4] WL: get metadata from es
[2024-01-16 22:35:53,098: WARNING/ForkPoolWorker-4] {"_index":"ta_playlist","_id":"WL","found":false}
[2024-01-16 22:35:53,098: WARNING/ForkPoolWorker-4] WL: get metadata from youtube
[2024-01-16 22:35:53,400: WARNING/ForkPoolWorker-4] WARNING: [youtube:tab] YouTube said: The playlist does not exist.
[2024-01-16 22:35:53,407: WARNING/ForkPoolWorker-4] ERROR: [youtube:tab] WL: YouTube said: The playlist does not exist.
[2024-01-16 22:35:53,407: WARNING/ForkPoolWorker-4] https://www.youtube.com/playlist?list=WL: failed to get info from youtube with message ERROR: [youtube:tab] WL: YouTube said: The playlist does not exist.
[2024-01-16 22:35:53,408: WARNING/ForkPoolWorker-4] WL: failed to extract data
[2024-01-16 22:35:53,410: WARNING/ForkPoolWorker-4] 79d3131a-8b23-4d5d-9c3a-d8ac674003c2 Failed callback
[2024-01-16 22:35:53,412: ERROR/ForkPoolWorker-4] Task subscribe_to[79d3131a-8b23-4d5d-9c3a-d8ac674003c2] raised unexpected: ValueError('WL: failed to extract data')
Traceback (most recent call last):
  File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 760, in __protected_call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/home/tasks.py", line 356, in subscribe_to
    SubscriptionHandler(url_str, task=self).subscribe(expected_type)
  File "/app/home/src/download/subscriptions.py", line 347, in subscribe
    self.subscribe_type(item, expected_type=expected_type)
  File "/app/home/src/download/subscriptions.py", line 357, in subscribe_type
    PlaylistSubscription().process_url_str([item])
  File "/app/home/src/download/subscriptions.py", line 193, in process_url_str
    raise ValueError(message)
ValueError: WL: failed to extract data
[2024-01-16 22:35:53,413: WARNING/ForkPoolWorker-4] 79d3131a-8b23-4d5d-9c3a-d8ac674003c2 return callback
https://www.youtube.com/playlist?list=WL
[2024-01-16 22:36:17,886: INFO/MainProcess] Task subscribe_to[d8d516be-fe76-4ad3-aa0f-5e2f8d1eb277] received
[2024-01-16 22:36:17,887: WARNING/ForkPoolWorker-4] subscribe_to create callback
[2024-01-16 22:36:17,920: WARNING/ForkPoolWorker-4] WL: get metadata from es
[2024-01-16 22:36:17,924: WARNING/ForkPoolWorker-4] {"_index":"ta_playlist","_id":"WL","found":false}
[2024-01-16 22:36:17,924: WARNING/ForkPoolWorker-4] WL: get metadata from youtube
[2024-01-16 22:36:18,222: WARNING/ForkPoolWorker-4] WARNING: [youtube:tab] YouTube said: The playlist does not exist.
[2024-01-16 22:36:18,228: WARNING/ForkPoolWorker-4] ERROR: [youtube:tab] WL: YouTube said: The playlist does not exist.
[2024-01-16 22:36:18,229: WARNING/ForkPoolWorker-4] https://www.youtube.com/playlist?list=WL: failed to get info from youtube with message ERROR: [youtube:tab] WL: YouTube said: The playlist does not exist.
[2024-01-16 22:36:18,229: WARNING/ForkPoolWorker-4] WL: failed to extract data
[2024-01-16 22:36:18,231: WARNING/ForkPoolWorker-4] d8d516be-fe76-4ad3-aa0f-5e2f8d1eb277 Failed callback
[2024-01-16 22:36:18,233: ERROR/ForkPoolWorker-4] Task subscribe_to[d8d516be-fe76-4ad3-aa0f-5e2f8d1eb277] raised unexpected: ValueError('WL: failed to extract data')
Traceback (most recent call last):
  File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 760, in __protected_call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/home/tasks.py", line 356, in subscribe_to
    SubscriptionHandler(url_str, task=self).subscribe(expected_type)
  File "/app/home/src/download/subscriptions.py", line 347, in subscribe
    self.subscribe_type(item, expected_type=expected_type)
  File "/app/home/src/download/subscriptions.py", line 357, in subscribe_type
    PlaylistSubscription().process_url_str([item])
  File "/app/home/src/download/subscriptions.py", line 193, in process_url_str
    raise ValueError(message)
ValueError: WL: failed to extract data
[2024-01-16 22:36:18,233: WARNING/ForkPoolWorker-4] d8d516be-fe76-4ad3-aa0f-5e2f8d1eb277 return callback
_index=ta_video _index=ta_video _id=Q9ySKZw_U14 _index=ta_video _index=ta_video _id=Q9ySKZw_U14 found=false
[pid: 41|app: 0|req: 2080/2080] 192.168.178.33 () {48 vars in 806 bytes} [Tue Jan 16 22:36:31 2024] GET /api/video/Q9ySKZw_U14/ => generated 501 bytes in 8 msecs (HTTP/1.1 404) 9 headers in 354 bytes (1 switches on core 0)
_index=ta_video _index=ta_video _id=T-U3c1nU3eM _index=ta_video _index=ta_video _id=T-U3c1nU3eM found=false
[pid: 41|app: 0|req: 2081/2081] 192.168.178.33 () {48 vars in 806 bytes} [Tue Jan 16 22:36:31 2024] GET /api/video/T-U3c1nU3eM/ => generated 501 bytes in 10 msecs (HTTP/1.1 404) 9 headers in 354 bytes (1 switches on core 0)
_index=ta_video _index=ta_video _id=SXYc5RoU3Lg _index=ta_video _index=ta_video _id=SXYc5RoU3Lg found=false
[pid: 41|app: 0|req: 2096/2096] 192.168.178.33 () {48 vars in 806 bytes} [Tue Jan 16 22:37:00 2024] GET /api/video/SXYc5RoU3Lg/ => generated 501 bytes in 12 msecs (HTTP/1.1 404) 9 headers in 354 bytes (1 switches on core 0)
https://www.youtube.com/playlist?list=WL
[2024-01-16 22:37:15,284: INFO/MainProcess] Task subscribe_to[6ad0b700-cca3-4533-8bc0-d69c83305abb] received
[2024-01-16 22:37:15,284: WARNING/ForkPoolWorker-4] subscribe_to create callback
[2024-01-16 22:37:15,310: WARNING/ForkPoolWorker-4] WL: get metadata from es
[2024-01-16 22:37:15,314: WARNING/ForkPoolWorker-4] {"_index":"ta_playlist","_id":"WL","found":false}
[2024-01-16 22:37:15,314: WARNING/ForkPoolWorker-4] WL: get metadata from youtube
[2024-01-16 22:37:15,620: WARNING/ForkPoolWorker-4] WARNING: [youtube:tab] YouTube said: The playlist does not exist.
[2024-01-16 22:37:15,627: WARNING/ForkPoolWorker-4] ERROR: [youtube:tab] WL: YouTube said: The playlist does not exist.
[2024-01-16 22:37:15,627: WARNING/ForkPoolWorker-4] https://www.youtube.com/playlist?list=WL: failed to get info from youtube with message ERROR: [youtube:tab] WL: YouTube said: The playlist does not exist.
[2024-01-16 22:37:15,627: WARNING/ForkPoolWorker-4] WL: failed to extract data
[2024-01-16 22:37:15,630: WARNING/ForkPoolWorker-4] 6ad0b700-cca3-4533-8bc0-d69c83305abb Failed callback
[2024-01-16 22:37:15,632: ERROR/ForkPoolWorker-4] Task subscribe_to[6ad0b700-cca3-4533-8bc0-d69c83305abb] raised unexpected: ValueError('WL: failed to extract data')
Traceback (most recent call last):
  File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 477, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 760, in __protected_call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/home/tasks.py", line 356, in subscribe_to
    SubscriptionHandler(url_str, task=self).subscribe(expected_type)
  File "/app/home/src/download/subscriptions.py", line 347, in subscribe
    self.subscribe_type(item, expected_type=expected_type)
  File "/app/home/src/download/subscriptions.py", line 357, in subscribe_type
    PlaylistSubscription().process_url_str([item])
  File "/app/home/src/download/subscriptions.py", line 193, in process_url_str
    raise ValueError(message)
ValueError: WL: failed to extract data
[2024-01-16 22:37:15,633: WARNING/ForkPoolWorker-4] 6ad0b700-cca3-4533-8bc0-d69c83305abb return callback

Anything else?

No response

Do you have cookies imported?

Yes, I believe so:
Screenshot 2024-01-16 at 22 58 30
Screenshot 2024-01-16 at 22 58 39

After revalidating the cookies, attempt to refresh the Metadata for the Playlist.

If it does not work, please include the logs segment that includes the cookie check and the updated Playlist failure in the logs.

I validated the cookie, and tried to add the watch later playlist again. Same errors. See attached logs. Line 63 mentions "validating cookie".
_tubearchivist_logs.txt

@bbilly1 do you have any additional requests regarding this bug report? It seems valid to me, but it also seems like it might be coming from yt-dlp. I don't see any other reports of issues coming in regarding LL or WL playlists.

This indicates that your cookie isn't working. Many people have reported similar issues, some accounts look to be banned on YT, these cookies will get deactivated practically immediately serverside on YT. If you are experiencing that, you might want to try to switch accounts, or stop using cookies alltogether and switch to unlisted playlists instead.

Ultimately, cookies in yt-dlp are flawed because YT can detect that easily and will block you as traffic can be associated with your account with little effort.

There is a warning about that in the docs.