From a78c1de752dbdd547dceea8721bee734c1409316 Mon Sep 17 00:00:00 2001 From: Mike Ruprecht Date: Wed, 4 May 2016 01:13:45 -0500 Subject: [PATCH] [abcgo] Add new extractor This patch adds an extractor for abc.go.com. The test case url is unfortunately only available for a few weeks before it expires. --- youtube_dl/extractor/abcgo.py | 37 ++++++++++++++++++++++++++++++ youtube_dl/extractor/extractors.py | 1 + 2 files changed, 38 insertions(+) create mode 100644 youtube_dl/extractor/abcgo.py diff --git a/youtube_dl/extractor/abcgo.py b/youtube_dl/extractor/abcgo.py new file mode 100644 index 000000000..c4b3edbb8 --- /dev/null +++ b/youtube_dl/extractor/abcgo.py @@ -0,0 +1,37 @@ +from __future__ import unicode_literals + +from .common import InfoExtractor + +class AbcGoIE(InfoExtractor): + IE_NAME = 'abc.go.com' + _VALID_URL = r'http://abc.go.com/shows/(?P.*)' + _TEST = { + 'url': 'http://abc.go.com/shows/marvels-agents-of-shield/episode-guide/season-03/17-the-team', + 'info_dict': { + 'id': '0_ebiua3ib', + 'ext': 'mp4', + 'title': 'The Team', + 'description': 'S.H.I.E.L.D. learns more about Hive\'s powers.', + 'uploader_id': 'KMCMigrator', + 'timestamp': 1461160081, + 'upload_date': '20160420', + }, + 'params': { + 'skip_download': True + } + } + + PARTNER_ID='585231' + + def _real_extract(self, url): + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) + + video_id = self._html_search_regex(r'vp:video="VDKA(.*?)"', webpage, + 'id') + + return { + '_type': 'url', + 'url': 'kaltura:%s:%s' % (self.PARTNER_ID, video_id), + 'ie_key': 'Kaltura', + } diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index ef4431364..8a8fa7546 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals from .abc import ABCIE from .abc7news import Abc7NewsIE +from .abcgo import AbcGoIE from .academicearth import AcademicEarthCourseIE from .acast import ( ACastIE,