1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-12-22 22:47:55 +01:00

[platzi] Improve client data extraction (closes #22290)

This commit is contained in:
Sergey M․ 2019-09-03 01:24:20 +07:00
parent 66d04c74e0
commit 31dbd054c8
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -107,7 +107,11 @@ class PlatziIE(PlatziBaseIE):
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']