Open LiuTaiShi opened 2 years ago
we intend to run header.py but faced "execjs._exceptions.ProgramError: SyntaxError: 语法错误":
C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\Scripts\python.exe C:/Users/bdzyl/PycharmProjects/ZhihuSpider/util/header.py Traceback (most recent call last): File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\util\header.py", line 63, in headers = gen_header(url_part=url_part, q=qkw, type=type, d_c0='"AOCZbcULsRKPTmJKb9A50mFqiq7Neud6dsg=|1613898999"') File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\util\header.py", line 39, in gen_header encrypt_str = ctx1.call('b', fmd5) File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_abstract_runtime_context.py", line 37, in call return self._call(name, *args) File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 92, in _call return self._eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args)) File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 78, in eval return self.exec(code) File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_abstract_runtimecontext.py", line 18, in exec return self.exec(source) File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 88, in exec return self._extract_result(output) File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 167, in _extract_result raise ProgramError(value) execjs._exceptions.ProgramError: SyntaxError: 语法错误
Process finished with exit code 1
We have load the git into our PycharmProject and satisfied the requirement. Is there some issues about our environment?
init: cd x-zse-96/ npm install jsdom
refer document: https://blog.csdn.net/qq_26394845/article/details/118183245
we intend to run header.py but faced "execjs._exceptions.ProgramError: SyntaxError: 语法错误":
C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\Scripts\python.exe C:/Users/bdzyl/PycharmProjects/ZhihuSpider/util/header.py Traceback (most recent call last): File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\util\header.py", line 63, in
headers = gen_header(url_part=url_part, q=qkw, type=type, d_c0='"AOCZbcULsRKPTmJKb9A50mFqiq7Neud6dsg=|1613898999"')
File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\util\header.py", line 39, in gen_header
encrypt_str = ctx1.call('b', fmd5)
File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_abstract_runtime_context.py", line 37, in call
return self._call(name, *args)
File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 92, in _call
return self._eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args))
File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 78, in eval
return self.exec(code)
File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_abstract_runtimecontext.py", line 18, in exec
return self.exec(source)
File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 88, in exec
return self._extract_result(output)
File "C:\Users\bdzyl\PycharmProjects\ZhihuSpider\venv\lib\site-packages\execjs_external_runtime.py", line 167, in _extract_result
raise ProgramError(value)
execjs._exceptions.ProgramError: SyntaxError: 语法错误
Process finished with exit code 1
We have load the git into our PycharmProject and satisfied the requirement. Is there some issues about our environment?