aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/ivi.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/extractor/ivi.py')
-rw-r--r--yt_dlp/extractor/ivi.py26
1 files changed, 10 insertions, 16 deletions
diff --git a/yt_dlp/extractor/ivi.py b/yt_dlp/extractor/ivi.py
index 5e1d89c9b..098ab6665 100644
--- a/yt_dlp/extractor/ivi.py
+++ b/yt_dlp/extractor/ivi.py
@@ -3,7 +3,6 @@ from __future__ import unicode_literals
import json
import re
-import sys
from .common import InfoExtractor
from ..utils import (
@@ -94,20 +93,21 @@ 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
- pycryptodomex_found = True
+ pycryptodome_found = True
except ImportError:
- pycryptodomex_found = False
- continue
+ try:
+ from Crypto.Cipher import Blowfish
+ from Crypto.Hash import CMAC
+ pycryptodome_found = True
+ except ImportError:
+ pycryptodome_found = False
+ continue
timestamp = (self._download_json(
self._LIGHT_URL, video_id,
@@ -140,14 +140,8 @@ 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 yt-dlp from sources.',
- expected=True)
- elif not pycryptodomex_found:
- raise ExtractorError(
- 'pycryptodomex not found. Please install',
- expected=True)
+ elif not pycryptodome_found:
+ raise ExtractorError('pycryptodome not found. Please install', expected=True)
elif message:
extractor_msg += ': ' + message
raise ExtractorError(extractor_msg % video_id, expected=True)