mirror of
https://github.com/ihmily/DouyinLiveRecorder.git
synced 2025-12-26 05:48:32 +08:00
fix: update tiktok parse
This commit is contained in:
parent
2a3fe027a0
commit
df469909cb
@ -235,8 +235,8 @@ def get_tiktok_stream_data(url: str, proxy_addr: Union[str, None] = None, cookie
|
||||
if 'UNEXPECTED_EOF_WHILE_READING' not in html_str:
|
||||
try:
|
||||
json_str = re.findall(
|
||||
'<script id="SIGI_STATE" type="application/json">(.*?)</script><script id="SIGI_RETRY" type="application/json">',
|
||||
html_str)[0]
|
||||
'<script id="SIGI_STATE" type="application/json">(.*?)</script>',
|
||||
html_str, re.S)[0]
|
||||
except Exception:
|
||||
raise ConnectionError("请检查你的网络是否可以正常访问TikTok网站")
|
||||
json_data = json.loads(json_str)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user