question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Return 'dislike_count' / 'average_rating' output template options for YT

See original GitHub issue

Checklist

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:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
pukkandancommented, Feb 14, 2022

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

1reaction
MinePlayersPEcommented, Feb 14, 2022

From the extension’s description:

Starting December 13th 2021, YouTube removed the ability to see dislikes from their API. This extension aims to restore power to users by using a combination of archived like and dislike data, as well as the likes and dislikes made by extension users to show the most accurate ratings.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found