Bindian9710 / Spider-Crack_Js

爬虫js解密、python解密 大众点评|中国移动|新浪微博|汽车之家|Steam|中华英才网|拼多多|36氪|今日头条... 欢迎Star
344 stars 114 forks source link

今日头条调用js报错 byted_acrawler 没有定义 #2

Closed luoqishuai closed 4 years ago

luoqishuai commented 4 years ago

大佬, https://github.com/Bindian9710/Spider-Crack_Js/tree/master/%E4%BB%8A%E6%97%A5%E5%A4%B4%E6%9D%A1 下载下来后,解压,运行的时候报错 Traceback (most recent call last): File "F:\python\PyCharm Community Edition 2017.2.4\helpers\pydev\pydevd.py", line 1599, in <module> globals = debugger.run(setup['file'], None, None, is_module) File "F:\python\PyCharm Community Edition 2017.2.4\helpers\pydev\pydevd.py", line 1026, in run pydev_imports.execfile(file, globals, locals) # execute the script File "F:\python\PyCharm Community Edition 2017.2.4\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "F:/python/work2/richang/今日头条/今日头条.py", line 64, in <module> Toutiao().runspider() File "F:/python/work2/richang/今日头条/今日头条.py", line 29, in runspider AS,CP = self.toutiao_js.call('get_AS_CP') File "F:\ANACONDA\lib\site-packages\execjs\_abstract_runtime_context.py", line 37, in call return self._call(name, *args) File "F:\ANACONDA\lib\site-packages\execjs\_external_runtime.py", line 92, in _call return self._eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args)) File "F:\ANACONDA\lib\site-packages\execjs\_external_runtime.py", line 78, in _eval return self.exec_(code) File "F:\ANACONDA\lib\site-packages\execjs\_abstract_runtime_context.py", line 18, in exec_ return self._exec_(source) File "F:\ANACONDA\lib\site-packages\execjs\_external_runtime.py", line 88, in _exec_ return self._extract_result(output) File "F:\ANACONDA\lib\site-packages\execjs\_external_runtime.py", line 167, in _extract_result raise ProgramError(value) execjs._exceptions.ProgramError: ReferenceError: byted_acrawler is not defined

byted_acrawler 没有定义

Bindian9710 commented 4 years ago

别用execjs去执行,最好使用node起一个服务,然后python去调接口。这样就不会报错了

------------------ 原始邮件 ------------------ 发件人: "luoqishuai"<notifications@github.com>; 发送时间: 2020年6月22日(星期一) 下午3:19 收件人: "Bindian9710/Spider-Crack_Js"<Spider-Crack_Js@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [Bindian9710/Spider-Crack_Js] 今日头条调用js报错 byted_acrawler 没有定义 (#2)

大佬, https://github.com/Bindian9710/Spider-Crack_Js/tree/master/%E4%BB%8A%E6%97%A5%E5%A4%B4%E6%9D%A1 下载下来后,解压,运行的时候报错 Traceback (most recent call last): File "F:\python\PyCharm Community Edition 2017.2.4\helpers\pydev\pydevd.py", line 1599, in <module> globals = debugger.run(setup['file'], None, None, is_module) File "F:\python\PyCharm Community Edition 2017.2.4\helpers\pydev\pydevd.py", line 1026, in run pydev_imports.execfile(file, globals, locals) # execute the script File "F:\python\PyCharm Community Edition 2017.2.4\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "F:/python/work2/richang/今日头条/今日头条.py", line 64, in <module> Toutiao().runspider() File "F:/python/work2/richang/今日头条/今日头条.py", line 29, in runspider AS,CP = self.toutiao_js.call('get_AS_CP') File "F:\ANACONDA\lib\site-packages\execjs_abstract_runtime_context.py", line 37, in call return self._call(name, *args) File "F:\ANACONDA\lib\site-packages\execjs_external_runtime.py", line 92, in _call return self._eval("{identifier}.apply(this, {args})".format(identifier=identifier, args=args)) File "F:\ANACONDA\lib\site-packages\execjs_external_runtime.py", line 78, in eval return self.exec(code) File "F:\ANACONDA\lib\site-packages\execjs_abstract_runtimecontext.py", line 18, in exec return self.exec(source) File "F:\ANACONDA\lib\site-packages\execjs_external_runtime.py", line 88, in exec return self._extract_result(output) File "F:\ANACONDA\lib\site-packages\execjs_external_runtime.py", line 167, in _extract_result raise ProgramError(value) execjs._exceptions.ProgramError: ReferenceError: byted_acrawler is not defined

byted_acrawler 没有定义

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

luoqishuai commented 4 years ago

byted_acrawler.sign 这个方法是没办法单独扣下来js代码吗?

Bindian9710 commented 4 years ago

这个方法是后面那一大串TAC生成的,你要是有时间可以试试给扣出来

------------------ 原始邮件 ------------------ 发件人: "luoqishuai"<notifications@github.com>; 发送时间: 2020年6月22日(星期一) 下午3:22 收件人: "Bindian9710/Spider-Crack_Js"<Spider-Crack_Js@noreply.github.com>; 抄送: "柴"<1824511233@qq.com>; "Comment"<comment@noreply.github.com>; 主题: Re: [Bindian9710/Spider-Crack_Js] 今日头条调用js报错 byted_acrawler 没有定义 (#2)

byted_acrawler.sign 这个方法是没办法单独扣下来js代码吗?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

luoqishuai commented 4 years ago

大佬, window.byted_acrawler.init({ aid: 24, dfp: true }) 这个要想插入你的js文件里面,要放到哪里啊?

Bindian9710 commented 4 years ago

这个好像是没用的- -。。。 加个联系方式?

------------------ 原始邮件 ------------------ 发件人: "luoqishuai"<notifications@github.com>; 发送时间: 2020年6月22日(星期一) 下午4:50 收件人: "Bindian9710/Spider-Crack_Js"<Spider-Crack_Js@noreply.github.com>; 抄送: "柴"<1824511233@qq.com>; "Comment"<comment@noreply.github.com>; 主题: Re: [Bindian9710/Spider-Crack_Js] 今日头条调用js报错 byted_acrawler 没有定义 (#2)

大佬, window.byted_acrawler.init({ aid: 24, dfp: true }) 这个要想插入你的js文件里面,要放到哪里啊?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

luoqishuai commented 4 years ago

我q 909110735