yt-dlp: --write-comments doesn't work

Checklist

  • I’m reporting a broken site
  • I’ve verified that I’m running yt-dlp version 2022.06.29 (update instructions) or later (specify commit)
  • I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue
  • I’ve read about sharing account credentials and I’m willing to share it if required

Region

Norway

Provide a description that is worded well enough to be understood

I have never been able to download comments from any site. The file that gets downloaded in example below is a 591 kB JSON file which seems to only contain code when I view it in a text editor.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

$ yt-dlp -vU --skip-download --write-comments https://www.youtube.com/watch?v=cvpEAt2Hdpo
[debug] Command-line config: ['-vU', '--skip-download', '--write-comments', 'https://www.youtube.com/watch?v=cvpEAt2Hdpo']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.06.29 [9d339c4]
[debug] Python 3.8.10 (CPython 64bit) - Linux-5.4.0-120-generic-x86_64-with-glibc2.29 (glibc 2.31)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.2.7, ffprobe 4.2.7
[debug] Optional libraries: Cryptodome-3.14.1, brotli-1.0.9, certifi-2019.11.28, mutagen-1.45.1, secretstorage-2.3.1, sqlite3-2.6.0, websockets-10.2
[debug] Proxy map: {}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
[debug] Downloading _update_spec from https://github.com/yt-dlp/yt-dlp/releases/download/2022.06.29/_update_spec
Latest version: 2022.06.29, Current version: 2022.06.29
yt-dlp is up to date (2022.06.29)
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=cvpEAt2Hdpo
[youtube] cvpEAt2Hdpo: Downloading webpage
[youtube] cvpEAt2Hdpo: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[youtube] Downloading comment section API JSON
[youtube] Downloading ~17 comments
[youtube] Sorting comments by newest first
[youtube] Downloading comment API JSON page 1 (0/17)
[youtube]     Downloading comment API JSON reply thread 1 (10/17)
[youtube]     Downloading comment API JSON reply thread 2 (14/17)
[youtube] Extracted 15 comments
[debug] Default format spec: bestvideo*+bestaudio/best
[info] cvpEAt2Hdpo: Downloading 1 format(s): 247+251
[info] Writing video metadata as JSON to: Har du tänkt på ekonomisk demokrati [cvpEAt2Hdpo].info.json

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

Not all data is extracted for all sites. Feel free to open a “site feature request”

Make them appear like they appear beneath a YouTube video so that I can read the discussion.

@HalvorRaknes : You can open the comments.json file in Firefox which will display the comments in a tree-view with collapsable discussion threads.