diff --git a/youtube_dl/extractor/platzi.py b/youtube_dl/extractor/platzi.py index 9efa51bdd..7fef4d1b1 100644 --- a/youtube_dl/extractor/platzi.py +++ b/youtube_dl/extractor/platzi.py @@ -3,16 +3,13 @@ from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( - compat_b64decode, compat_str, ) from ..utils import ( - clean_html, ExtractorError, int_or_none, str_or_none, try_get, - url_or_none, urlencode_postdata, urljoin, ) @@ -105,39 +102,35 @@ class PlatziIE(PlatziBaseIE): webpage = self._download_webpage(url, lecture_id) data_preloaded_state = self._parse_json( - self._search_regex((r'window.__PRELOADED_STATE__ = (.*)\<\/script'), webpage, 'client data'), + self._search_regex( + (r'window\s*.\s*__PRELOADED_STATE__\s*=\s*({.*?});?\s*