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

[youtube] Availability tag doesn't work as intented #9845

Open
11 tasks done
znaczki654 opened this issue May 3, 2024 · 4 comments
Open
11 tasks done

[youtube] Availability tag doesn't work as intented #9845

znaczki654 opened this issue May 3, 2024 · 4 comments
Labels
site-enhancement Feature request for some website triage Untriaged issue

Comments

@znaczki654
Copy link

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

Poland

Provide a description that is worded well enough to be understood

According to the wiki: availability (string): Whether the video is "private", "premium_only", "subscriber_only", "needs_auth", "unlisted" or "public"

Well... so from my tests ("print" and "print-to-file") can only output:

  • public for public videos,
  • unlisted for unlisted videos,
  • needs_auth for age restricted videos.

Private, video unavailable, video unavailable due to copyright-infringement leaves empty. But in the console there is and "ERROR" message that the video is private or unavailable. Simply "availability" switch for "print" and "print-to-file" does not print anything.

yt-dlp --print availability output.txt --skip-download -vU
yt-dlp --print-to-file availability output.txt --skip-download -vU

links tested:
public: https://www.youtube.com/watch?v=vCwLB8TzFBQ (prints correctly: public)
unlisted: https://www.youtube.com/watch?v=_DfaprsHQZU (prints correctly: unlisted)
not available: https://www.youtube.com/watch?v=EaaXBJr7fkY (prints nothing, only error in the console)
not available - copyright infringement: https://www.youtube.com/watch?v=glMGukgviGY (prints nothing, only error in the console)
private: https://youtube.com/watch?v=pWRVE8P9npM (prints nothing, only error in the console)
age-gated: https://youtube.com/watch?v=HtVdAasjOgU (prints correctly: needs_auth)

I suppose for the videos I have given it should print out the availability to the output file (with the "print-to-file" or to the console with "print").

So the result should be for 6 videos:
public
unlisted
video_not_available
video_not_available_copyright
private
needs_auth

and there is only:
public
unlisted
needs_auth

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

Executing command: yt-dlp https://www.youtube.com/watch?v=vCwLB8TzFBQ --skip-download --print availability -vU
[debug] Command-line config: ['https://www.youtube.com/watch?v=vCwLB8TzFBQ', '--skip-download', '--print', 'availability', '-vU']
[debug] Encodings: locale cp1250, fs utf-8, pref cp1250, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 7.0-essentials_build-www.gyan.dev (setts), ffprobe 7.0-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[youtube] Extracting URL: https://www.youtube.com/watch?v=vCwLB8TzFBQ
[youtube] vCwLB8TzFBQ: Downloading webpage
[youtube] vCwLB8TzFBQ: Downloading ios player API JSON
[youtube] vCwLB8TzFBQ: Downloading android player API JSON
WARNING: [youtube] Skipping player responses from android clients (got player responses for video "aQvGIIdgFDM" instead of "vCwLB8TzFBQ")
[debug] Loading youtube-nsig.7d1f7724 from cache
[debug] [youtube] Decrypted nsig NOm5_SlzT0Vq_YevTH => h9EUJPBppEMVqw
[debug] Loading youtube-nsig.7d1f7724 from cache
[debug] [youtube] Decrypted nsig TuKFIqr_f383iffkYi => 9iWJ3-WCTogdFA
[youtube] vCwLB8TzFBQ: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] vCwLB8TzFBQ: Downloading 1 format(s): 248+251
public
Executing command: yt-dlp https://www.youtube.com/watch?v=_DfaprsHQZU --skip-download --print availability -vU
[debug] Command-line config: ['https://www.youtube.com/watch?v=_DfaprsHQZU', '--skip-download', '--print', 'availability', '-vU']
[debug] Encodings: locale cp1250, fs utf-8, pref cp1250, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 7.0-essentials_build-www.gyan.dev (setts), ffprobe 7.0-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[youtube] Extracting URL: https://www.youtube.com/watch?v=_DfaprsHQZU
[youtube] _DfaprsHQZU: Downloading webpage
[youtube] _DfaprsHQZU: Downloading ios player API JSON
[youtube] _DfaprsHQZU: Downloading android player API JSON
WARNING: [youtube] Skipping player responses from android clients (got player responses for video "aQvGIIdgFDM" instead of "_DfaprsHQZU")
[debug] [youtube] Extracting signature function js_edea0cc6_107
[debug] Loading youtube-sigfuncs.js_edea0cc6_107 from cache
[debug] Loading youtube-nsig.edea0cc6 from cache
[debug] [youtube] Decrypted nsig hTdCD1Ymev8jf8box3j => zFmjEGgYDL-ZHA
[debug] [youtube] Extracting signature function js_edea0cc6_103
[debug] Loading youtube-sigfuncs.js_edea0cc6_103 from cache
[debug] Loading youtube-nsig.edea0cc6 from cache
[debug] [youtube] Decrypted nsig F-Ot_u_X4BFBDZLy9DH => VimqnV7AbgglwA
[youtube] _DfaprsHQZU: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] _DfaprsHQZU: Downloading 1 format(s): 303+251
unlisted
Executing command: yt-dlp https://www.youtube.com/watch?v=EaaXBJr7fkY --skip-download --print availability -vU
[debug] Command-line config: ['https://www.youtube.com/watch?v=EaaXBJr7fkY', '--skip-download', '--print', 'availability', '-vU']
[debug] Encodings: locale cp1250, fs utf-8, pref cp1250, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 7.0-essentials_build-www.gyan.dev (setts), ffprobe 7.0-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[youtube] Extracting URL: https://www.youtube.com/watch?v=EaaXBJr7fkY
[youtube] EaaXBJr7fkY: Downloading webpage
[youtube] EaaXBJr7fkY: Downloading ios player API JSON
[youtube] EaaXBJr7fkY: Downloading android player API JSON
WARNING: [youtube] Skipping player responses from android clients (got player responses for video "aQvGIIdgFDM" instead of "EaaXBJr7fkY")
ERROR: [youtube] EaaXBJr7fkY: Video unavailable
  File "yt_dlp\extractor\common.py", line 734, in extract
  File "yt_dlp\extractor\youtube.py", line 4182, in _real_extract
  File "yt_dlp\extractor\common.py", line 1251, in raise_no_formats

Executing command: yt-dlp https://www.youtube.com/watch?v=glMGukgviGY --skip-download --print availability -vU
[debug] Command-line config: ['https://www.youtube.com/watch?v=glMGukgviGY', '--skip-download', '--print', 'availability', '-vU']
[debug] Encodings: locale cp1250, fs utf-8, pref cp1250, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 7.0-essentials_build-www.gyan.dev (setts), ffprobe 7.0-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[youtube] Extracting URL: https://www.youtube.com/watch?v=glMGukgviGY
[youtube] glMGukgviGY: Downloading webpage
[youtube] glMGukgviGY: Downloading ios player API JSON
[youtube] glMGukgviGY: Downloading android player API JSON
WARNING: [youtube] Skipping player responses from android clients (got player responses for video "aQvGIIdgFDM" instead of "glMGukgviGY")
ERROR: [youtube] glMGukgviGY: Video unavailable. This video is no longer available due to a copyright claim by franck keller
  File "yt_dlp\extractor\common.py", line 734, in extract
  File "yt_dlp\extractor\youtube.py", line 4182, in _real_extract
  File "yt_dlp\extractor\common.py", line 1251, in raise_no_formats

Executing command: yt-dlp https://youtube.com/watch?v=pWRVE8P9npM --skip-download --print availability -vU
[debug] Command-line config: ['https://youtube.com/watch?v=pWRVE8P9npM', '--skip-download', '--print', 'availability', '-vU']
[debug] Encodings: locale cp1250, fs utf-8, pref cp1250, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 7.0-essentials_build-www.gyan.dev (setts), ffprobe 7.0-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[youtube] Extracting URL: https://youtube.com/watch?v=pWRVE8P9npM
[youtube] pWRVE8P9npM: Downloading webpage
[youtube] pWRVE8P9npM: Downloading ios player API JSON
[youtube] pWRVE8P9npM: Downloading android player API JSON
WARNING: [youtube] Skipping player responses from android clients (got player responses for video "aQvGIIdgFDM" instead of "pWRVE8P9npM")
ERROR: [youtube] pWRVE8P9npM: Private video. Sign in if you've been granted access to this video
  File "yt_dlp\extractor\common.py", line 734, in extract
  File "yt_dlp\extractor\youtube.py", line 4182, in _real_extract
  File "yt_dlp\extractor\common.py", line 1251, in raise_no_formats

Executing command: yt-dlp https://youtube.com/watch?v=HtVdAasjOgU --skip-download --print availability -vU
[debug] Command-line config: ['https://youtube.com/watch?v=HtVdAasjOgU', '--skip-download', '--print', 'availability', '-vU']
[debug] Encodings: locale cp1250, fs utf-8, pref cp1250, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 7.0-essentials_build-www.gyan.dev (setts), ffprobe 7.0-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[youtube] Extracting URL: https://youtube.com/watch?v=HtVdAasjOgU
[youtube] HtVdAasjOgU: Downloading webpage
[youtube] HtVdAasjOgU: Downloading ios player API JSON
[youtube] HtVdAasjOgU: Downloading tv embedded player API JSON
[youtube] HtVdAasjOgU: Downloading android player API JSON
[youtube] HtVdAasjOgU: Downloading web embedded client config
[youtube] HtVdAasjOgU: Downloading player edea0cc6
[youtube] HtVdAasjOgU: Downloading web embedded player API JSON
WARNING: [youtube] Skipping player responses from android clients (got player responses for video "aQvGIIdgFDM" instead of "HtVdAasjOgU")
[debug] Loading youtube-nsig.edea0cc6 from cache
[debug] [youtube] Decrypted nsig 43OLdizyirJzSe6h0ih => OZJP702sSkeANg
[debug] Loading youtube-nsig.edea0cc6 from cache
[debug] [youtube] Decrypted nsig Dj9QeuBSdF0D9W-mhCh => _LqvUaqRaDiTtQ
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] HtVdAasjOgU: Downloading 1 format(s): 248+251
needs_auth
@znaczki654 znaczki654 added site-bug Issue with a specific website triage Untriaged issue labels May 3, 2024
@bashonly
Copy link
Member

bashonly commented May 3, 2024

add --ignore-no-formats-error to your command for the videos that error

video_not_available
video_not_available_copyright

these are not documented/valid values for availability

@znaczki654
Copy link
Author

znaczki654 commented May 3, 2024

public
unlisted
NA
NA
NA
needs_auth

private is neither working
but at least we have NA

Regarding:
video_not_available
video_not_available_copyright

Yes these are not documented, but since it can be measured what is the availability as seen by the error message, I think those cases should be handled as well by the "availability" print option.

@pukkandan
Copy link
Member

Availability is not meant to detect unavailable videos, but to distinguish private vs public etc for videos that yt-dlp can process. From your examples, the private video can potentially be fixed (Related #9835), but others are out of scope

@pukkandan pukkandan added site-enhancement Feature request for some website and removed site-bug Issue with a specific website labels May 3, 2024
@znaczki654
Copy link
Author

Is there an option to add another tag then to distinguish unavailable videos since the error message already shows the needed information? It could be useful in the same way like private videos so you could check which videos cannot be downloaded and why. Just a suggestion not a necessity the "private" status in availability is the main issue which stopped working.

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 triage Untriaged issue
Projects
None yet
Development

No branches or pull requests

3 participants