projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e4e5fa6
)
[orf:tvthek] Improve geo restricted videos detection (closes #23741)
author
Sergey M․
<dstftw@gmail.com>
Tue, 14 Jan 2020 21:32:05 +0000
(
04:32
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Tue, 14 Jan 2020 21:32:05 +0000
(
04:32
+0700)
youtube_dl/extractor/orf.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/orf.py
b/youtube_dl/extractor/orf.py
index 45fc745a3e9ece07ffa943ff4d38288a6cb943e9..d54b8ace6e5eeee6ee7188bd1cfe88a2471f3627 100644
(file)
--- a/
youtube_dl/extractor/orf.py
+++ b/
youtube_dl/extractor/orf.py
@@
-90,8
+90,11
@@
class ORFTVthekIE(InfoExtractor):
format_id = '-'.join(format_id_list)
ext = determine_ext(src)
if ext == 'm3u8':
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))
elif ext == 'f4m':
formats.extend(self._extract_f4m_formats(
src, video_id, f4m_id=format_id, fatal=False))