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.

Vrtnu running with username and password: age restriction not handled correctly

See original GitHub issue

Checklist

  • [ x] I’m reporting a broken site support
  • [ x] I’ve verified that I’m running youtube-dl version 2021.04.26
  • [ x] I’ve checked that all provided URLs are alive and playable in a browser
  • [ x] I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • [ x] I’ve searched the bugtracker for similar issues including closed ones

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://www.vrt.be/vrtnu/a-z/petra/1/petra-s1a2/']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.04.26
[debug] Python version 3.8.5 (CPython) - Linux-5.8.0-53-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.2.4, ffprobe 4.2.4, rtmpdump 2.4
[debug] Proxy map: {}
[VrtNU] Logging in
[VrtNU] Requesting a token
[VrtNU] petra-s1a2: Downloading webpage
[Canvas] pbs-pub-e3cd125e-b92d-4142-a860-dc819cdd9424$vid-c358d4e5-e805-4db1-8c92-ccc087ead5ca: Downloading token
[Canvas] pbs-pub-e3cd125e-b92d-4142-a860-dc819cdd9424$vid-c358d4e5-e805-4db1-8c92-ccc087ead5ca: Downloading video JSON
ERROR: Age category 0+ is not allowed to access 12+ content
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 806, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 827, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/canvas.py", line 80, in _real_extract
    raise ExtractorError(data.get('message') or code, expected=True)
youtube_dl.utils.ExtractorError: Age category 0+ is not allowed to access 12+ content

Description

Can not download age restricted video from https://www.vrt.be/vrtnu/ (e.g. https://www.vrt.be/vrtnu/a-z/petra/1/petra-s1a2/), although my account allows playing it. An account can be made from the site: https://www.vrt.be/vrtnu/

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:16

github_iconTop GitHub Comments

1reaction
chaff02commented, Jun 8, 2021

No problem Matthias. Your code at #29044 (comment) works for me. I only have to replace the value of the identityToken by the actual value of the ‘vrtnu-site_profile_vt’ cookie from www.vrt.be. However this cookie has a short lifetime, as a result many ‘make youtube-dl’ commands. Success with your exams.

1reaction
MatthiasCoppenscommented, May 23, 2021

@sharethewisdom: This enables me to download https://www.vrt.be/vrtnu/a-z/before-we-die/2/before-we-die-s2a1/:

headers.update({'Content-Type': 'application/json'})
identityToken = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3Rva2VuLnZydC5iZSIsInN1YiI6IjY3NmJjMTk1MDAwNzQ1MWFiMTU2NGNjYjI5NTdmZjJjIiwibmV3c3ViIjoiMTQ1ODRjZmUtMjllNC00NzZhLWI1NDEtYjM5MWJhOTc3M2U4IiwiY291IjoiQkUiLCJhZ2UiOjI0LCJhdWQiOiIvdnJ0bnUiLCJpYXQiOjE2MjE3Nzg2MDgsImV4cCI6MTYyMTc4MjIwOCwiYWMiOiIxNisifQ.g8lM8aQX9tVacP9OUz8EAplGac76v5P9wBT8DlXGoDwQvVLncNcafnZiI5OYwVsClcMJBScAsRVKdgSXPXWT9DuPhlfyUs49zpgz-Xb05NHDAIFuFxv0DTNOB9FJEqcMGho4ehl5_524ZoIa9PavlzmPRee-Y9HKw1f-E3o3rkws73GFYAkOhTjXqo55Gg3_HCOqfJEqgKrYzvF-ILMmY9XRqVmn4c1Fw5tTcBspt77h6nKkpb6S231BQELTurJtF7-zwixuKSwZZbdhnruTFUUYlPMK4Y71ZP8PmIapappGXuf7r162FqHEVMgX1UmxWgVdHBPGzaCrNsTZtM3jWzgSlsaopN9u78cKs1N7MKxqXmD2har2a1FJBMDT0XK-oqlMRF8afTnaNEMlHixpz8M-Y4xOcDiUCPmhSCPCiLxJVmcApMM-h_jixwE04eHMYAEndseWp5cZAkz7R3p0oGmrTnYne5xTEJ5-myq3HLtzGfsAkq873e0PepEqv4mDvEEQOUWzmOL44TUQboPv8Ju267Jk3stTBhUcXvKLoFDHmvFJxj_a77QSrnLtaSvLpIqQKjvigC6JejVjwHfe3TQuBDMdeZoH3maW0s9dyM3cK6fMLTI6eS0lqQ3Oct2YM3kvV3XHGO70QD_pLpCY1YbE2YpteWZbfC-2PY-5dP0"
post_data = json.dumps({"identityToken": identityToken}).encode()
token = self._download_json(
    '%s/tokens' % self._REST_API_BASE, video_id,
    'Downloading token',
    data=post_data,
    headers=headers)['vrtPlayerToken']
Read more comments on GitHub >

github_iconTop Results From Across the Web

Minimum password age (Windows 10) | Microsoft Learn
The Minimum password age policy setting determines the period of time (in days) that a password must be used before the user can...
Read more >
ChangeLog · TempleTea/youtube-dl - Gitee.com
[youtube] Fix age gate content detection (#26100, #26152, #26311, #26384). * [youtube:user] Extend URL regular expression (#26443).
Read more >
youtube-dl/ChangeLog at master - Codeberg
Fix password protected videos extraction (#23176). * Respect age limit option and family filter cookie value (#18437). * Handle video url playlist query ......
Read more >
A comparative study of PSM strategic responses in Flanders ...
Public service media in the age of SVoDs: A comparative study of PSM strategic ... non-economic goals including universal access to high-quality media, ......
Read more >
youtube-dl 2021.06.06 - Fresh FOSS
Add suport for User Authentication. password protected videos extraction. Respect age limit option and family filter cookie value. Handle video url playlist ...
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