diff options
author | Tithen-Firion <tithen.firion.0@gmail.com> | 2017-08-03 14:17:25 +0200 |
---|---|---|
committer | Tithen-Firion <tithen.firion.0@gmail.com> | 2017-08-03 14:17:25 +0200 |
commit | feee8d32e45c9521426cf4a089c70f37542f0065 (patch) | |
tree | a18fdfaec4b0328f2ce14f711ae31f0414efae07 /youtube_dl/utils.py | |
parent | c89267d31ad99eb5b1a87cd354de5280a2a087b1 (diff) |
[phantomjs] add exe version to debug info
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index c67f95ac9..4d0685d83 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -3895,6 +3895,10 @@ class PhantomJSwrapper(object): _TMP_FILE_NAMES = ['script', 'html', 'cookies'] + @staticmethod + def _version(): + return get_exe_version('phantomjs', version_re=r'([0-9.]+)') + def __init__(self, extractor, required_version=None, timeout=10000): self.exe = check_executable('phantomjs', ['-v']) if not self.exe: @@ -3905,7 +3909,7 @@ class PhantomJSwrapper(object): self.extractor = extractor if required_version: - version = get_exe_version(self.exe, version_re=r'([0-9.]+)') + version = self._version() if is_outdated_version(version, required_version): self.extractor._downloader.report_warning( 'Your copy of PhantomJS is outdated, update it to version ' |