提交 4b95cdc2 编写于 作者: H hjdhnx

增加免嗅耗时统计

上级 ff03c615
...@@ -626,6 +626,7 @@ class CMS: ...@@ -626,6 +626,7 @@ class CMS:
if self.lazy: if self.lazy:
print(f'{play_url}->开始执行免嗅代码->{self.lazy}') print(f'{play_url}->开始执行免嗅代码->{self.lazy}')
if not str(self.lazy).startswith('js:'): if not str(self.lazy).startswith('js:'):
t1 = time()
pycode = runPy(self.lazy) pycode = runPy(self.lazy)
if pycode: if pycode:
# print(pycode) # print(pycode)
...@@ -634,7 +635,7 @@ class CMS: ...@@ -634,7 +635,7 @@ class CMS:
return play_url return play_url
pyenv = safePython(self.lazy,pycode[pos:]) pyenv = safePython(self.lazy,pycode[pos:])
lazy_url = pyenv.action_task_exec('lazyParse',[play_url,self.d]) lazy_url = pyenv.action_task_exec('lazyParse',[play_url,self.d])
logger.info(f'播放免嗅结果:{lazy_url}') logger.info(f'py免嗅耗时:{get_interval(t1)}毫秒,播放地址:{lazy_url}')
if isinstance(lazy_url,str) and lazy_url.startswith('http'): if isinstance(lazy_url,str) and lazy_url.startswith('http'):
play_url = lazy_url play_url = lazy_url
else: else:
...@@ -650,13 +651,13 @@ class CMS: ...@@ -650,13 +651,13 @@ class CMS:
}) })
ctx = py_ctx ctx = py_ctx
# print(ctx) # print(ctx)
t1 = time()
jscode = getPreJs() + jscode jscode = getPreJs() + jscode
# print(jscode) # print(jscode)
loader,_ = runJScode(jscode,ctx=ctx) loader,_ = runJScode(jscode,ctx=ctx)
# print(loader.toString()) # print(loader.toString())
play_url = loader.eval('input') play_url = loader.eval('input')
logger.info(f'免嗅播放地址:{play_url}') logger.info(f'js免嗅耗时:{get_interval(t1)}毫秒,播放地址:{play_url}')
return play_url return play_url
else: else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册