mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 12:01:28 +00:00
[platzi] Improve client data extraction (closes #22290)
This commit is contained in:
parent
66d04c74e0
commit
31dbd054c8
|
@ -107,7 +107,11 @@ def _real_extract(self, url):
|
|||
|
||||
data = self._parse_json(
|
||||
self._search_regex(
|
||||
r'client_data\s*=\s*({.+?})\s*;', webpage, 'client data'),
|
||||
# client_data may contain "};" so that we have to try more
|
||||
# strict regex first
|
||||
(r'client_data\s*=\s*({.+?})\s*;\s*\n',
|
||||
r'client_data\s*=\s*({.+?})\s*;'),
|
||||
webpage, 'client data'),
|
||||
lecture_id)
|
||||
|
||||
material = data['initialState']['material']
|
||||
|
|
Loading…
Reference in a new issue