def detect_phantomjs(self):
logger.info('detecting phantomjs')
this_os = self.get_os().lower()
if 'windows' in this_os:
if os.path.isfile(self.home_dir + self.binary_win):
return self.home_dir + self.binary_win
else:
return False
elif 'linux' in this_os:
if sys.maxsize > 2 ** 32:
if os.path.isfile(self.home_dir + self.binary_linux64):
return self.home_dir + self.binary_linux64
else:
return False
else:
if os.path.isfile(self.home_dir + self.binary_linux32):
return self.home_dir + self.binary_linux32
else:
return False
else:
raise Exception('''
Platform not supported.
install phantomjs manualy and update the path in your config
''')
评论列表
文章目录