1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-09 19:54:32 +01:00
youtube-dl/youtube_dl/extractor/sonyliv.py

35 lines
1.2 KiB
Python
Raw Normal View History

2016-08-08 01:11:00 +02:00
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class SonyLIVIE(InfoExtractor):
2016-08-08 21:16:28 +02:00
_VALID_URL = r'https?://(?:www\.)?sonyliv\.com/details/[^/]+/(?P<id>\d+)'
_TESTS = [{
'url': "http://www.sonyliv.com/details/episodes/5024612095001/Ep.-1---Achaari-Cheese-Toast---Bachelor's-Delight",
2016-08-08 01:11:00 +02:00
'info_dict': {
2016-08-08 21:16:28 +02:00
'title': "Ep. 1 - Achaari Cheese Toast - Bachelor's Delight",
2016-08-08 01:11:00 +02:00
'id': '5024612095001',
'ext': 'mp4',
'upload_date': '20160707',
2016-08-08 21:16:28 +02:00
'description': 'md5:7f28509a148d5be9d0782b4d5106410d',
2016-08-08 01:11:00 +02:00
'uploader_id': '4338955589001',
'timestamp': 1467870968,
},
'params': {
'skip_download': True,
},
'add_ie': ['BrightcoveNew'],
2016-08-08 21:16:28 +02:00
}, {
'url': 'http://www.sonyliv.com/details/full%20movie/4951168986001/Sei-Raat-(Bangla)',
'only_matching': True,
}]
2016-08-08 01:11:00 +02:00
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/4338955589001/default_default/index.html?videoId=%s'
def _real_extract(self, url):
2016-08-08 21:16:28 +02:00
brightcove_id = self._match_id(url)
return self.url_result(
self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id, 'BrightcoveNew', brightcove_id)