Skip to content

Commit

Permalink
[orf:tvthek] Improve geo restricted videos detection (closes #23741)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstftw committed Jan 14, 2020
1 parent e4e5fa6 commit 90ea83c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions youtube_dl/extractor/orf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ def _real_extract(self, url):
format_id = '-'.join(format_id_list)
ext = determine_ext(src)
if ext == 'm3u8':
formats.extend(self._extract_m3u8_formats(
src, video_id, 'mp4', m3u8_id=format_id, fatal=False))
m3u8_formats = self._extract_m3u8_formats(
src, video_id, 'mp4', m3u8_id=format_id, fatal=False)
if any('/geoprotection' in f['url'] for f in m3u8_formats):
self.raise_geo_restricted()
formats.extend(m3u8_formats)
elif ext == 'f4m':
formats.extend(self._extract_f4m_formats(
src, video_id, f4m_id=format_id, fatal=False))
Expand Down

0 comments on commit 90ea83c

Please sign in to comment.