[mtv] Improve detection of geoblocked videos

This commit is contained in:
Jaime Marquínez Ferrándiz 2014-03-08 19:43:18 +01:00
parent 1060425cbb
commit cc1db7f9b7

View file

@ -40,8 +40,9 @@ def _get_thumbnail_url(self, uri, itemdoc):
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'):