mirror of
https://github.com/imgyh/tiktok.git
synced 2025-10-07 20:30:02 +08:00
支持本地生成X-Bogus
由于使用第三方接口必然会产生网络延迟等问题,故支持本地生成X-Bogus 参考项目https://github.com/B1gM8c/tiktok
This commit is contained in:
parent
428ab6ff30
commit
d5c424b2a7
@ -18,7 +18,8 @@ import re
|
||||
import json
|
||||
import requests
|
||||
from TikTokUrls import Urls
|
||||
|
||||
import urllib.parse
|
||||
import execjs
|
||||
|
||||
class Utils(object):
|
||||
def __init__(self):
|
||||
@ -59,7 +60,6 @@ class Utils(object):
|
||||
try:
|
||||
xbogus = execjs.compile(open('./X-Bogus.js').read()).call('sign', query, user_agent)
|
||||
params = url + "&X-Bogus=" + xbogus
|
||||
print(params)
|
||||
except Exception as e:
|
||||
print('[ 错误 ]:X-Bogus算法异常')
|
||||
return
|
||||
|
@ -1,3 +1,4 @@
|
||||
requests==2.28.2
|
||||
flask==2.2.2
|
||||
pyinstaller==5.7.0
|
||||
PyExecJS==1.5.1
|
Loading…
x
Reference in New Issue
Block a user