mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
[tiktok] fix extraction
This commit is contained in:
parent
355e22584c
commit
bbc4df7a89
@ -23,7 +23,8 @@ def tiktok_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
|
||||
}
|
||||
|
||||
html = getHttps(host, url, headers=headers)
|
||||
data = r1(r'window\[\'SIGI_STATE\'\]=(.*?);window\[\'SIGI_RETRY\'\]', html)
|
||||
data = r1(r'window\[\'SIGI_STATE\'\]=(.*?);window\[\'SIGI_RETRY\'\]', html) or \
|
||||
r1(r'<script id="SIGI_STATE" type="application/json">(.*?)</script>', html)
|
||||
info = json.loads(data)
|
||||
downloadAddr = info['ItemModule'][vid]['video']['downloadAddr']
|
||||
author = info['ItemModule'][vid]['author'] # same as uniqueId
|
||||
|
Loading…
Reference in New Issue
Block a user