]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/slideslive.py
ed84322c5131b49a1acac4deedb4d049832d7547
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
5 from ..utils
import ExtractorError
8 class SlidesLiveIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://slideslive\.com/(?P<id>[0-9]+)'
11 # video_service_name = YOUTUBE
12 'url': 'https://slideslive.com/38902413/gcc-ia16-backend',
13 'md5': 'b29fcd6c6952d0c79c5079b0e7a07e6f',
17 'title': '38902413: external video',
18 'description': '3890241320170925-9-1yd6ech.mp4',
19 'uploader': 'SlidesLive Administrator',
20 'uploader_id': 'UC62SdArr41t_-_fX40QCLRw',
21 'upload_date': '20170925',
24 # video_service_name = youtube
25 'url': 'https://slideslive.com/38903721/magic-a-scientific-resurrection-of-an-esoteric-legend',
26 'only_matching': True,
29 def _real_extract(self
, url
):
30 video_id
= self
._match
_id
(url
)
31 video_data
= self
._download
_json
(
32 url
, video_id
, headers
={'Accept': 'application/json'})
33 service_name
= video_data
['video_service_name'].lower()
34 if service_name
== 'youtube':
35 yt_video_id
= video_data
['video_service_id']
36 return self
.url_result(yt_video_id
, 'Youtube', video_id
=yt_video_id
)
39 'Unsupported service name: {0}'.format(service_name
), expected
=True)