Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
6 tasks done
pjta opened this issue Feb 14, 2022 · 7 comments
Closed
6 tasks done

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

pjta opened this issue Feb 14, 2022 · 7 comments
Labels
site-enhancement Feature request for some website wontfix This will not be worked on

Comments

@pjta
Copy link

pjta commented Feb 14, 2022

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
@pjta pjta added site-enhancement Feature request for some website triage Untriaged issue labels Feb 14, 2022
@MinePlayersPE
Copy link
Contributor

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.

@pjta
Copy link
Author

pjta commented Feb 14, 2022

MinePlayersPE, thanks for the explanation.

@pjta pjta closed this as completed Feb 14, 2022
@pjta
Copy link
Author

pjta commented Feb 14, 2022

Well, that Chrome extension has a public API https://github.com/Anarios/return-youtube-dislike
Maybe consider using it ?

@pjta pjta reopened this Feb 14, 2022
@MinePlayersPE
Copy link
Contributor

Doesn't really make sense to fetch from a 3rd-party API for an extractor

@pjta
Copy link
Author

pjta commented Feb 14, 2022

I understand the reluctance to use a 3d-party API.
But in the current situation when there are no other options, there is still some sense. The 'average_rating' (even approximate) is nice to have when bulk/playlist/channel downloading and filtering by best rating.

(Not trying to push you, just sharing my reasoning. So totally up to you.)

@pukkandan
Copy link
Member

pukkandan commented 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

@pukkandan pukkandan added wontfix This will not be worked on and removed triage Untriaged issue labels Feb 14, 2022
@pukkandan
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-enhancement Feature request for some website wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants