X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fiprima.py;h=8529bedfc0ab283790e74144bc9d570df19dc4b3;hb=1cc79574fc5df21bf35dccf61eac0e9e75ed8d20;hp=6ca0e9122a51ebdf621ed4d999e4065700c1c48c;hpb=826422351152e0e0840bca737bdaccc238d423fd;p=youtube-dl diff --git a/youtube_dl/extractor/iprima.py b/youtube_dl/extractor/iprima.py index 6ca0e9122..8529bedfc 100644 --- a/youtube_dl/extractor/iprima.py +++ b/youtube_dl/extractor/iprima.py @@ -6,8 +6,10 @@ from random import random from math import floor from .common import InfoExtractor -from ..utils import ( +from ..compat import ( compat_urllib_request, +) +from ..utils import ( ExtractorError, ) @@ -39,6 +41,7 @@ class IPrimaIE(InfoExtractor): 'params': { 'skip_download': True, # requires rtmpdump }, + 'skip': 'Do not have permission to access this page', }] def _real_extract(self, url): @@ -47,13 +50,13 @@ class IPrimaIE(InfoExtractor): webpage = self._download_webpage(url, video_id) - if re.search(r'Nemáte oprávnění přistupovat na tuto stránku.\s*', webpage): + if re.search(r'Nemáte oprávnění přistupovat na tuto stránku\.\s*', webpage): raise ExtractorError( '%s said: You do not have permission to access this page' % self.IE_NAME, expected=True) player_url = ( 'http://embed.livebox.cz/iprimaplay/player-embed-v2.js?__tok%s__=%s' % - (floor(random()*1073741824), floor(random()*1073741824)) + (floor(random() * 1073741824), floor(random() * 1073741824)) ) req = compat_urllib_request.Request(player_url)