mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-10-30 22:52:40 +00:00
parent
ebc7d3ff1f
commit
11e1c2e3f8
1 changed files with 6 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
|||
from ..utils import (
|
||||
ExtractorError,
|
||||
HEADRequest,
|
||||
UnsupportedError,
|
||||
get_first,
|
||||
int_or_none,
|
||||
join_nonempty,
|
||||
|
@ -890,5 +891,8 @@ class TikTokVMIE(InfoExtractor):
|
|||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
return self.url_result(self._request_webpage(
|
||||
HEADRequest(url), self._match_id(url), headers={'User-Agent': 'facebookexternalhit/1.1'}).geturl(), TikTokIE)
|
||||
new_url = self._request_webpage(
|
||||
HEADRequest(url), self._match_id(url), headers={'User-Agent': 'facebookexternalhit/1.1'}).geturl()
|
||||
if self.suitable(new_url): # Prevent infinite loop in case redirect fails
|
||||
raise UnsupportedError(new_url)
|
||||
return self.url_result(new_url)
|
||||
|
|
Loading…
Reference in a new issue