diff --git a/youtube_dl/extractor/platzi.py b/youtube_dl/extractor/platzi.py index 7fef4d1b1..0bf916084 100644 --- a/youtube_dl/extractor/platzi.py +++ b/youtube_dl/extractor/platzi.py @@ -6,9 +6,12 @@ from ..compat import ( compat_str, ) from ..utils import ( + clean_html, ExtractorError, + get_element_by_class, int_or_none, str_or_none, + strip_or_none, try_get, urlencode_postdata, urljoin, @@ -100,38 +103,47 @@ class PlatziIE(PlatziBaseIE): def _real_extract(self, url): lecture_id = self._match_id(url) - webpage = self._download_webpage(url, lecture_id) + headers = {'User-Agent': 'Mozilla/5.0'} + webpage = self._download_webpage(url, lecture_id, headers=headers) data_preloaded_state = self._parse_json( self._search_regex( (r'window\s*.\s*__PRELOADED_STATE__\s*=\s*({.*?});?\s*