]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/slideslive.py
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 'url': 'https://slideslive.com/38902413/gcc-ia16-backend',
12 'md5': 'b29fcd6c6952d0c79c5079b0e7a07e6f',
16 'title': '38902413: external video',
17 'description': '3890241320170925-9-1yd6ech.mp4',
18 'uploader': 'SlidesLive Administrator',
19 'uploader_id': 'UC62SdArr41t_-_fX40QCLRw',
20 'upload_date': '20170925',
24 def _real_extract(self
, url
):
25 video_id
= self
._match
_id
(url
)
26 video_data
= self
._download
_json
(
27 url
, video_id
, headers
={'Accept': 'application/json'})
28 service_name
= video_data
['video_service_name']
29 if service_name
== 'YOUTUBE':
30 yt_video_id
= video_data
['video_service_id']
31 return self
.url_result(yt_video_id
, 'Youtube', video_id
=yt_video_id
)
34 'Unsupported service name: {0}'.format(service_name
), expected
=True)