[TikTok] Pass cookies to formats (#2171)

Closes #2166
Authored by: MinePlayersPE
pull/2193/head
MinePlayersPE 3 years ago committed by GitHub
parent cfcf60ea99
commit 6134fbeb65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -161,6 +161,10 @@ class TikTokBaseIE(InfoExtractor):
}))
self._remove_duplicate_formats(formats)
auth_cookie = self._get_cookies(self._WEBPAGE_HOST).get('sid_tt')
if auth_cookie:
for f in formats:
self._set_cookie(f['url'], 'sid_tt', auth_cookie.value)
self._sort_formats(formats, ('quality', 'codec', 'size', 'br'))
thumbnails = []

Loading…
Cancel
Save