mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-14 13:37:45 +08:00
[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.
This commit is contained in:
parent
6d17aa096f
commit
a78c1de752
37
youtube_dl/extractor/abcgo.py
Normal file
37
youtube_dl/extractor/abcgo.py
Normal file
@ -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<id>.*)'
|
||||
_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',
|
||||
}
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user