diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-30 17:23:59 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-08-30 18:13:37 +0530 |
commit | d81ba7d491bf2c89246d8817438db48a5a4e4ae9 (patch) | |
tree | a530e370d90289d3e23107328cb66a48b4ebb92c /yt_dlp/extractor/openload.py | |
parent | 5135ed3d4a87b3c03902aec68b60b40855b12863 (diff) |
[jsinterp, extractor/youtube] Minor fixes
Diffstat (limited to 'yt_dlp/extractor/openload.py')
-rw-r--r-- | yt_dlp/extractor/openload.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/yt_dlp/extractor/openload.py b/yt_dlp/extractor/openload.py index 4bba7bdd0..d2756a006 100644 --- a/yt_dlp/extractor/openload.py +++ b/yt_dlp/extractor/openload.py @@ -52,6 +52,8 @@ class PhantomJSwrapper: This class is experimental. """ + INSTALL_HINT = 'Please download it from https://phantomjs.org/download.html' + _BASE_JS = R''' phantom.onError = function(msg, trace) {{ var msgStack = ['PHANTOM ERROR: ' + msg]; @@ -110,8 +112,7 @@ class PhantomJSwrapper: self.exe = check_executable('phantomjs', ['-v']) if not self.exe: - raise ExtractorError( - 'PhantomJS not found, Please download it from https://phantomjs.org/download.html', expected=True) + raise ExtractorError(f'PhantomJS not found, {self.INSTALL_HINT}', expected=True) self.extractor = extractor @@ -237,6 +238,6 @@ class PhantomJSwrapper: except Exception as e: raise ExtractorError(f'{note} failed: Unable to run PhantomJS binary', cause=e) if returncode: - raise ExtractorError(f'{note} failed:\n{stderr.strip()}') + raise ExtractorError(f'{note} failed with returncode {returncode}:\n{stderr.strip()}') return stdout |