yt-dlp / yt-dlp

A feature-rich command-line audio/video downloader
https://discord.gg/H5MNcFW63r
The Unlicense
90.72k stars 7.05k forks source link

[YouTube] Unable to download live chat replay using oauth from any membership VOD #11454

Open echri opened 2 weeks ago

echri commented 2 weeks ago

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

Checklist

Region

United States

Provide a description that is worded well enough to be understood

Downloading VOD with live chat replay

Cookies Oauth
public vod
membership vod

Case 1: downloading a finished public live stream including live chat replay using cookies, finished without issue. Case 2: downloading a finished public live stream including live chat replay using oauth, finished without issue. Case 3: downloading a finished membership live stream including live chat replay using cookies, finished without issue. Case 4: downloading a finished membership live stream including live chat replay using oauth, failed downloading the live chat replay.

Error screenshot:

image

Provide verbose output that clearly demonstrates the problem

Complete Verbose Output

[debug] Command-line config: ['https://youtu.be/6ogRb2hS8KU', '--extractor-args', 'youtube:player-client=ios,web;formats=incomplete,comment_sort=top', '-i', '--check-formats', '--progress', '--merge-output-format', 'mp4', '--add-metadata', '--embed-thumbnail', '--write-comments', '--embed-chapters', '--sub-langs', 'en,live_chat', '--sub-format', 'ass/srt/best', '--embed-subs', '--write-info-json', '--write-subs', '--write-description', '--write-comments', '--write-thumbnail', '--write-auto-subs', '-f', 'bestvideo*+bestaudio/best', '-N', '16', '-o', '[%(upload_date)s] %(title).100B [%(uploader)s](%(id)s).f%(format_id)s.%(ext)s', '--username=PRIVATE', '--password=', '--cache-dir=~/private/oauth', '--sleep-interval', '5', '--use-postprocessor', 'ReturnYoutubeDislike:when=pre_process', '--throttled-rate', '5M', '-vU', '--skip-download']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.11.04 from yt-dlp/yt-dlp [197d0b03b] (pip)                                                                                                                                                                 
[debug] Python 3.12.3 (CPython x86_64 64bit) - Linux-6.1.91-x86_64-with-glibc2.24 (OpenSSL 3.3.0 9 Apr 2024, glibc 2.24)
[debug] exe versions: ffmpeg N-70388-gaff24c1658-static (setts), ffprobe N-70388-gaff24c1658-static
[debug] Optional libraries: Cryptodome-3.20.0, brotlicffi-1.1.0.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.16.2, urllib3-2.2.1, websockets-13.1, xattr-1.1.0
[debug] Proxy map: {}                                                                                                  
[debug] Request Handlers: urllib, requests, websockets, curl_cffi                             
[debug] Post-Processor Plugins: ReturnYoutubeDislikePP                                                                 
[debug] Plugin directories: ['/media/sdaa1/pikachoo/local/python/lib/python3.12/site-packages/yt_dlp_plugins']
[debug] Loaded 1838 extractors                                                                                                                                                                                                                
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.11.04 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.11.04 from yt-dlp/yt-dlp)
[debug] Loading youtube.oauth_refresh_token_main from cache
[youtube] oauth: Refreshing access token
[debug] [youtube] oauth: Logged in using profile "main"
[youtube] Extracting URL: https://youtu.be/6ogRb2hS8KU
[youtube] 6ogRb2hS8KU: Downloading webpage
[youtube] 6ogRb2hS8KU: Downloading ios player API JSON
WARNING: [youtube] No PO Token provided for web client, which is required for working web formats. You can manually pass a PO Token for this client with --extractor-args "youtube:po_token=web+XXX"
[debug] Loading youtube-nsig.4e23410d from cache
[debug] [youtube] Decrypted nsig qc3qeR0A2B5kTOzVC => Fhqw3p11uuPATA
WARNING: [youtube] 6ogRb2hS8KU: web client formats require a PO Token which was not provided. They will be deprioritized as they may yield HTTP Error 403
[debug] Loading youtube-nsig.4e23410d from cache
[debug] [youtube] Decrypted nsig aq3OyQczkFsqIraSc => 8tG2Z8y0cTduXw
[youtube] 6ogRb2hS8KU: Downloading m3u8 information
[info] 6ogRb2hS8KU: Downloading subtitles: en, live_chat
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] ReturnYoutubeDislike query: https://returnyoutubedislikeapi.com/votes?videoId=6ogRb2hS8KU&likeCount=1160
[youtube] Downloading comment section API JSON
[youtube] Downloading ~40 comments
[youtube] Sorting comments by newest first
[youtube] Downloading comment API JSON page 1 (0/~40)
[youtube] Downloading comment API JSON page 2 (20/~40)
[youtube] Extracted 40 comments
[info] Testing format 299
[download] Destination: /tmp/tmppttxuuly.tmp
[download] 100% of   10.00KiB in 00:00:00 at 612.94KiB/s
[info] Testing format 251
[download] Destination: /tmp/tmpcwf27gcb.tmp
[download] 100% of   10.00KiB in 00:00:00 at 894.93KiB/s
[info] 6ogRb2hS8KU: Downloading 1 format(s): 299+251
[info] Writing video description to: [20241103] 【Members Only】TCG Card Shop Simulator: Show Me Them Cards [Ouro Kronii Ch. hololive-EN](6ogRb2hS8KU).f299+251.description
[info] Writing video subtitles to: [20241103] 【Members Only】TCG Card Shop Simulator: Show Me Them Cards [Ouro Kronii Ch. hololive-EN](6ogRb2hS8KU).f299+251.en.vtt
[debug] Invoking http downloader on "https://www.youtube.com/api/timedtext?v=6ogRb2hS8KU&ei=_24pZ7-OFaaG6dsPuabvmAs&caps=asr&opi=112496729&exp=xbt&xoaf=4&hl=en&ip=0.0.0.0&ipbits=0&expire=1730793839&sparams=ip%2Cipbits%2Cexpire%2Cv%2Cei%2Ccaps%2Copi%2Cexp%2Cxoaf&signature=C43F879CCB8A9ED8250874F53B5DB0469A55286E.C89CE81FBA43D6778315FC76E4B45917B6403DBC&key=yt8&kind=asr&lang=en&fmt=vtt"
[download] Destination: [20241103] 【Members Only】TCG Card Shop Simulator: Show Me Them Cards [Ouro Kronii Ch. hololive-EN](6ogRb2hS8KU).f299+251.en.vtt
[download] 100% of    1.39MiB in 00:00:00 at 6.54MiB/s
[info] Writing video subtitles to: [20241103] 【Members Only】TCG Card Shop Simulator: Show Me Them Cards [Ouro Kronii Ch. hololive-EN](6ogRb2hS8KU).f299+251.live_chat.json
[debug] Invoking youtube_live_chat downloader on "https://www.youtube.com/watch?v=6ogRb2hS8KU&bpctr=9999999999&has_verified=1"
[youtube_live_chat] Downloading live chat
[youtube_live_chat] Total fragments: unknown (live)
[download] Destination: [20241103] 【Members Only】TCG Card Shop Simulator: Show Me Them Cards [Ouro Kronii Ch. hololive-EN](6ogRb2hS8KU).f299+251.live_chat.json
[download]  976.57KiB at  721.92KiB/s (00:00:00) (frag 1)ERROR: can only concatenate str (not "NoneType") to str
Traceback (most recent call last):
  File "/media/sdaa1/pikachoo/local/python/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 1625, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/sdaa1/pikachoo/local/python/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 1781, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/sdaa1/pikachoo/local/python/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 1840, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/sdaa1/pikachoo/local/python/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 3011, in process_video_result
    self.process_info(new_info)
  File "/media/sdaa1/pikachoo/local/python/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 178, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/sdaa1/pikachoo/local/python/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 3267, in process_info
    sub_files = self._write_subtitles(info_dict, temp_filename)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/sdaa1/pikachoo/local/python/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 4351, in _write_subtitles
    self.dl(sub_filename, sub_copy, subtitle=True)
  File "/media/sdaa1/pikachoo/local/python/lib/python3.12/site-packages/yt_dlp/YoutubeDL.py", line 3199, in dl
    return fd.download(name, new_info, subtitle)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/sdaa1/pikachoo/local/python/lib/python3.12/site-packages/yt_dlp/downloader/common.py", line 466, in download
    ret = self.real_download(filename, info_dict)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/sdaa1/pikachoo/local/python/lib/python3.12/site-packages/yt_dlp/downloader/youtube_live_chat.py", line 162, in real_download
    chat_page_url = 'https://www.youtube.com/live_chat_replay?continuation=' + continuation_id
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
TypeError: can only concatenate str (not "NoneType") to str
bashonly commented 2 weeks ago

'--extractor-args', 'youtube:player-client=ios,web;

can you try it without the player-client args?

echri commented 2 weeks ago

got the same error.