浏览代码

[mtv] Improve detection of geoblocked videos

Jaime Marquínez Ferrándiz 11 年之前
父节点
当前提交
cc1db7f9b7
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      youtube_dl/extractor/mtv.py

+ 3 - 2
youtube_dl/extractor/mtv.py

@@ -40,8 +40,9 @@ class MTVServicesInfoExtractor(InfoExtractor):
             return thumb_node.attrib['url']
 
     def _extract_video_formats(self, mdoc):
-        if re.match(r'.*/error_country_block\.swf$', mdoc.find('.//src').text) is not None:
-            raise ExtractorError('This video is not available from your country.', expected=True)
+        if re.match(r'.*/(error_country_block\.swf|geoblock\.mp4)$', mdoc.find('.//src').text) is not None:
+            raise ExtractorError('This video is not available from your country.',
+                expected=True)
 
         formats = []
         for rendition in mdoc.findall('.//rendition'):