Skip to content

Commit

Permalink
Allow downloading age restricted content from arte
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanLobbenmeier committed Oct 7, 2023
1 parent 4392c46 commit 93c400c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion yt_dlp/extractor/arte.py
Expand Up @@ -136,7 +136,10 @@ def _real_extract(self, url):
lang = mobj.group('lang') or mobj.group('lang_2')
langauge_code = self._LANG_MAP.get(lang)

config = self._download_json(f'{self._API_BASE}/config/{lang}/{video_id}', video_id)
config = self._download_json(f'{self._API_BASE}/config/{lang}/{video_id}', video_id, headers= {
"x-validated-age": 18
})


geoblocking = traverse_obj(config, ('data', 'attributes', 'restriction', 'geoblocking')) or {}
if geoblocking.get('restrictedArea'):
Expand Down

0 comments on commit 93c400c

Please sign in to comment.