X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fivi.py;h=b5a740a01e1d360ca667869edef88f85e3559842;hb=43ebf77df3bbd93dbbd0336b0243d8d50895ab72;hp=315ea03faf0dff2d0b75536516295c2e379ed9d1;hpb=f8015c15746e83394ecc395c6a13823d20971772;p=youtube-dl
diff --git a/youtube_dl/extractor/ivi.py b/youtube_dl/extractor/ivi.py
index 315ea03fa..b5a740a01 100644
--- a/youtube_dl/extractor/ivi.py
+++ b/youtube_dl/extractor/ivi.py
@@ -1,8 +1,9 @@
# coding: utf-8
from __future__ import unicode_literals
-import re
import json
+import re
+import sys
from .common import InfoExtractor
from ..utils import (
@@ -93,9 +94,13 @@ class IviIE(InfoExtractor):
]
})
+ bundled = hasattr(sys, 'frozen')
+
for site in (353, 183):
content_data = (data % site).encode()
if site == 353:
+ if bundled:
+ continue
try:
from Cryptodome.Cipher import Blowfish
from Cryptodome.Hash import CMAC
@@ -135,6 +140,10 @@ class IviIE(InfoExtractor):
extractor_msg = 'Video %s does not exist'
elif site == 353:
continue
+ elif bundled:
+ raise ExtractorError(
+ 'This feature does not work from bundled exe. Run youtube-dl from sources.',
+ expected=True)
elif not pycryptodomex_found:
raise ExtractorError(
'pycryptodomex not found. Please install it.',
@@ -230,7 +239,7 @@ class IviCompilationIE(InfoExtractor):
self.url_result(
'http://www.ivi.ru/watch/%s/%s' % (compilation_id, serie), IviIE.ie_key())
for serie in re.findall(
- r']+data-id="\1"' % compilation_id, html)]
+ r']+\bhref=["\']/watch/%s/(\d+)["\']' % compilation_id, html)]
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)