mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-22 18:22:21 +00:00
[mtv] Improve detection of geoblocked videos
This commit is contained in:
parent
1060425cbb
commit
cc1db7f9b7
1 changed files with 3 additions and 2 deletions
|
@ -40,8 +40,9 @@ class MTVServicesInfoExtractor(InfoExtractor):
|
||||||
return thumb_node.attrib['url']
|
return thumb_node.attrib['url']
|
||||||
|
|
||||||
def _extract_video_formats(self, mdoc):
|
def _extract_video_formats(self, mdoc):
|
||||||
if re.match(r'.*/error_country_block\.swf$', mdoc.find('.//src').text) is not None:
|
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)
|
raise ExtractorError('This video is not available from your country.',
|
||||||
|
expected=True)
|
||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
for rendition in mdoc.findall('.//rendition'):
|
for rendition in mdoc.findall('.//rendition'):
|
||||||
|
|
Loading…
Reference in a new issue