From: Remita Amine Date: Fri, 7 Oct 2016 14:53:03 +0000 (+0100) Subject: [iprima] detect geo restriction X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=3c6b3bf2217e91c0d01ca65fa2b013ffa132fdbc;p=youtube-dl [iprima] detect geo restriction --- diff --git a/youtube_dl/extractor/iprima.py b/youtube_dl/extractor/iprima.py index 788bbe0d5..da2cdc656 100644 --- a/youtube_dl/extractor/iprima.py +++ b/youtube_dl/extractor/iprima.py @@ -81,6 +81,9 @@ class IPrimaIE(InfoExtractor): for _, src in re.findall(r'src["\']\s*:\s*(["\'])(.+?)\1', playerpage): extract_formats(src) + if not formats and '>GEO_IP_NOT_ALLOWED<' in playerpage: + self.raise_geo_restricted() + self._sort_formats(formats) return {