aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-02-17 23:28:41 +0600
committerSergey M․ <dstftw@gmail.com>2016-02-17 23:28:41 +0600
commit63bf4f0dc0502a87c19863c2509a4bc28c7c1abb (patch)
tree4e51f3bac410945aeea7acc7974194410ed8791a
parent80e59a0d5d397c46c73d52a4e2c1ec6af3b9b1e7 (diff)
[vrt] Detect geo restriction
-rw-r--r--youtube_dl/extractor/vrt.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/extractor/vrt.py b/youtube_dl/extractor/vrt.py
index 522e2bbc8..2b6bae89b 100644
--- a/youtube_dl/extractor/vrt.py
+++ b/youtube_dl/extractor/vrt.py
@@ -79,6 +79,10 @@ class VRTIE(InfoExtractor):
formats.extend(self._extract_f4m_formats(
'%s/manifest.f4m' % mobj.group('src'),
video_id, f4m_id='hds', fatal=False))
+
+ if not formats and 'data-video-geoblocking="true"' in webpage:
+ self.raise_geo_restricted('This video is only available in Belgium')
+
self._sort_formats(formats)
title = self._og_search_title(webpage)