From 0f0b26034934513bcc98bc6cc50c07126e45f258 Mon Sep 17 00:00:00 2001 From: Joshua Lochner Date: Sun, 22 Nov 2020 17:02:33 +0200 Subject: [PATCH] [GamerDVR] Add new extractor --- youtube_dl/extractor/extractors.py | 1 + youtube_dl/extractor/gamerdvr.py | 39 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 youtube_dl/extractor/gamerdvr.py diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index fb18a0563..61d18223e 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -398,6 +398,7 @@ from .fusion import FusionIE from .fxnetworks import FXNetworksIE from .gaia import GaiaIE from .gameinformer import GameInformerIE +from .gamerdvr import GamerDVRIE from .gamespot import GameSpotIE from .gamestar import GameStarIE from .gaskrank import GaskrankIE diff --git a/youtube_dl/extractor/gamerdvr.py b/youtube_dl/extractor/gamerdvr.py new file mode 100644 index 000000000..5ebe8195b --- /dev/null +++ b/youtube_dl/extractor/gamerdvr.py @@ -0,0 +1,39 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor + + +class GamerDVRIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?gamerdvr\.com/gamer/\S+/video/(?P\d+)' + _TEST = { + 'url': 'https://gamerdvr.com/gamer/videogamer3/video/83193307', + 'md5': 'f747c74fbc7617a70d8c071927623cde', + 'info_dict': { + 'id': '83193307', + 'ext': 'mp4', + 'title': "videogamer3's Xbox Call of Duty®: Modern Warfare® clip 83193307. Find your Xbox clips on GamerDVR.com", + 'description': "videogamer3's Xbox Call of Duty®: Modern Warfare® clips and gameplay playing Call of Duty®: Modern Warfare®. All your Xbox clips and screenshots on GamerDVR.com. View, manage, and share easily!", + 'uploader': 'videogamer3' + } + } + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + video_url = self._html_search_regex( + r"(.+?)', webpage, 'title', fatal=False) + description = self._html_search_regex( + r"