diff --git a/src/you_get/extractors/youtube.py b/src/you_get/extractors/youtube.py index f87ea31b22..dd06daf8ad 100644 --- a/src/you_get/extractors/youtube.py +++ b/src/you_get/extractors/youtube.py @@ -201,7 +201,7 @@ def prepare(self, **kwargs): self.js = get_content(self.html5player).replace('\n', ' ') logging.debug('Loading ytInitialPlayerResponse...') - ytInitialPlayerResponse = json.loads(re.search('ytInitialPlayerResponse\s*=\s*([^\n]+?});(\n|)', video_page).group(1)) + ytInitialPlayerResponse = json.loads(re.search('ytInitialPlayerResponse\s*=\s*([^\n]+?});(\n||var )', video_page).group(1)) # Get the video title self.title = ytInitialPlayerResponse["videoDetails"]["title"]