diff options
author | Aakash Gajjar <skyqutip@gmail.com> | 2019-12-24 11:39:43 +0530 |
---|---|---|
committer | Aakash Gajjar <skyqutip@gmail.com> | 2019-12-24 11:39:43 +0530 |
commit | b901b6a08bcba71ce1efe7652def534f5c51879b (patch) | |
tree | 94f00ae3e60f46525a2c7707ef7bcb64341a0d88 | |
parent | bd62ec31cc5e749d8a207593639d3a27adafeb3d (diff) | |
download | hypervideo-pre-b901b6a08bcba71ce1efe7652def534f5c51879b.tar.lz hypervideo-pre-b901b6a08bcba71ce1efe7652def534f5c51879b.tar.xz hypervideo-pre-b901b6a08bcba71ce1efe7652def534f5c51879b.zip |
[tiktok] fix json_string extraction
-rw-r--r-- | youtube_dl/extractor/tiktok.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/tiktok.py b/youtube_dl/extractor/tiktok.py index 539fc9ecd..185b66eb6 100644 --- a/youtube_dl/extractor/tiktok.py +++ b/youtube_dl/extractor/tiktok.py @@ -239,7 +239,7 @@ class TikTokIE(TikTokBaseIE): } webpage = self._download_webpage(url, video_id, headers=headers, note='Downloading video webpage') json_string = self._search_regex( - r'id=\"__NEXT_DATA__\"\s+type=\"application\/json\">\s*(?P<json_string>[^<]+)', + r'id=\"__NEXT_DATA__\"\s+type=\"application\/json\"\s*[^>]+>\s*(?P<json_string>[^<]+)', webpage, 'json_string', group='json_string') json_data = self._parse_json(json_string, video_id) video_data = try_get(json_data, lambda x: x['props']['pageProps'], expected_type=dict) |