From f3679b67ca9a2d89765c0ff44c7c4da9bec6a123 Mon Sep 17 00:00:00 2001 From: CommanderRoot Date: Sun, 16 Oct 2016 05:34:47 +0200 Subject: [PATCH] [Youtube] Add game extractor Adds the ability for the Youtube extractor to fetch the selected game on a video. The first regex is for games which have an image, the second for games which don't. --- youtube_dl/extractor/youtube.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index cb266eab6..940aa2058 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1357,6 +1357,15 @@ class YoutubeIE(YoutubeBaseInfoExtractor): else: video_description = '' + # game + video_game = self._html_search_regex( + r']+class="title"[^>]*>\s*Game\s*\s*(]*>.*\s*.*\s*.*\s.*\s*\s*)?]*>\s*
  • ]*>(?P.+?)]+class="title"[^>]*>\s*Game\s*\s*(]*>.*\s*.*\s*.*\s.*\s*\s*)?]*>\s*
  • (?P.+?)( \(.*\))?