Skip to content

Commit

Permalink
[tiktok] fix json_string extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
skyme5 committed Dec 24, 2019
1 parent bd62ec3 commit b901b6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion youtube_dl/extractor/tiktok.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def _real_extract(self, url):
}
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)
Expand Down

0 comments on commit b901b6a

Please sign in to comment.