]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[vrt] Detect geo restriction
authorSergey M․ <dstftw@gmail.com>
Wed, 17 Feb 2016 17:28:41 +0000 (23:28 +0600)
committerSergey M․ <dstftw@gmail.com>
Wed, 17 Feb 2016 17:28:41 +0000 (23:28 +0600)
youtube_dl/extractor/vrt.py

index 522e2bbc862cf6ccb93f96f0d431276023282789..2b6bae89bd2a450c9babe1ea77e299b806b752c1 100644 (file)
@@ -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)