Return 'dislike_count' / 'average_rating' output template options for YT
See original GitHub issueChecklist
- I’m reporting a site feature request
- I’ve verified that I’m running yt-dlp version 2022.02.04. (update instructions)
- I’ve checked that all provided URLs are alive and playable in a browser
- 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
Australia
Example URLs
yt-dlp -o ‘%(uploader)s/[avg.%(average_rating).2f][dis.%(dislike_count).2f][likes.%(like_count)s][dur.%(duration)s][date.%(upload_date)s] - %(title)s-%(id)s.%(ext)s’ https://www.youtube.com/watch?v=6awfj_6IfFg --get-filename
Description
yt-dlp is not outputting ‘dislike_count’ / ‘average_rating’ for Youtube (This happened after YT had hidden public dislikes count). However Chrome extension “Return YouTube Dislike” is able to retrieve dislikes count. So I assume the count is still available through some alternative API.
Verbose log
yt-dlp -vU -o '%(uploader)s/[avg.%(average_rating).2f][dis.%(dislike_count).2f][likes.%(like_count)s][dur.%(duration)s][date.%(upload_date)s] - %(title)s-%(id)s.%(ext)s' https://www.youtube.com/watch?v=6awfj_6IfFg
[debug] Command-line config: ['-vU', '-o', '%(uploader)s/[avg.%(average_rating).2f][dis.%(dislike_count).2f][likes.%(like_count)s][dur.%(duration)s][date.%(upload_date)s] - %(title)s-%(id)s.%(ext)s', 'https://www.youtube.com/watch?v=6awfj_6IfFg']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.02.04 [c1653e9ef]
[debug] Python version 3.10.2 (CPython 64bit) - macOS-10.15.7-x86_64-i386-64bit
[debug] exe versions: ffmpeg 5.0 (fdk,setts), ffprobe 5.0, phantomjs 2.1.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.02.04, Current version: 2022.02.04
yt-dlp is up to date (2022.02.04)
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=6awfj_6IfFg
[youtube] 6awfj_6IfFg: Downloading webpage
[youtube] 6awfj_6IfFg: 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
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 6awfj_6IfFg: Downloading 1 format(s): 248+251
[debug] Invoking downloader on "https://rr2---sn-u2bpouxgoxu-ntq6.googlevideo.com/videoplayback?expire=1644867445&ei=FVsKYt7RFKGL2roPxL2MQA&ip=27.33.12.211&id=o-AAAWsx3FQrc18j29PRddGw2mSshMsJB6_pbYSuTTbzdL&itag=248&source=youtube&requiressl=yes&mh=DQ&mm=31%2C29&mn=sn-u2bpouxgoxu-ntq6%2Csn-ntqe6nee&ms=au%2Crdu&mv=m&mvi=2&pl=23&gcr=au&initcwndbps=1610000&vprv=1&mime=video%2Fwebm&gir=yes&clen=46792163&dur=261.400&lmt=1644268117277040&mt=1644845586&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5437434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgBmXVav6ZDQuhL_mjcX6oVCqPXAUPboS7jQxQZTblXo0CIQCGrIgh0Yf8ak9f8nPw_32Xou147hk1NOkDR6aEAYQMnA%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgOaOH3O9TmePqwzsJghmjS2ZSyus3EG2VLCvaOLVFJiUCICt0bPDWTfeqe7II4HkwErbcbWmmJu4P7asL7c7H2R6g"
[download] Resuming download at byte 12242481
[download] Destination: Olympics/[avg.NA][dis.NA][likes.572][dur.261][date.20220207] - Figure Skating Beijing 2022 _ Team women's free highlights-6awfj_6IfFg.f248.webm
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
I coded a userscript to restore the dislike counter on YouTube
For almost every single video I tested the script on, the estimated dislike count is 100% accurate. There are only some videos with...
Read more >goutubedl - Go Packages
Go wrapper for youtube-dl and yt-dlp, currently tested and developed using yt-dlp. ... type Info; type Options; type Printer; type Result.
Read more >using output template error via youtube-dl - Stack Overflow
Your options -citw do not make any sense. Simply remove them (maybe leave -i ) and the download will work. In detail: -c...
Read more >yt-dlp - PyPI
OUTPUT TEMPLATE. The -o option allows users to indicate a template for the output file names. tl;dr: navigate me to examples.
Read more >API — pytube 12.1.2 documentation
Returns a list of streams if they have been initialized. ... Parameters: video_id (str) – The video id of the YouTube video. Return...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Totally understand where you are coming from. But I agree that it doesn’t make sense in the core program, especially considering we have the ability to load plugin Postprocessors.
I personally use a custom PP to do this. I’ll clean up the code and release it as a plugin
From the extension’s description: