aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-08-09 02:16:28 +0700
committerSergey M․ <dstftw@gmail.com>2016-08-09 02:16:28 +0700
commit77426a087b6af712b69faf62a54db959f0d13288 (patch)
tree36ac8cb5a3e33224e57a1d72c615f4921478c052
parent8991844ea260a17943e935acfd5565caab27a99e (diff)
downloadyoutube-dl-77426a087b6af712b69faf62a54db959f0d13288.zip
youtube-dl-77426a087b6af712b69faf62a54db959f0d13288.tar.gz
youtube-dl-77426a087b6af712b69faf62a54db959f0d13288.tar.bz2
[sonyliv] Improve (Closes #10258)
-rw-r--r--youtube_dl/extractor/sonyliv.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/youtube_dl/extractor/sonyliv.py b/youtube_dl/extractor/sonyliv.py
index c717b1f..accd112 100644
--- a/youtube_dl/extractor/sonyliv.py
+++ b/youtube_dl/extractor/sonyliv.py
@@ -5,15 +5,15 @@ from .common import InfoExtractor
class SonyLIVIE(InfoExtractor):
- _VALID_URL = r'http?://(?:www\.)?sonyliv\.com/details/episodes/(?P<id>[0-9]+)/'
- _TEST = {
- 'url': 'http://www.sonyliv.com/details/episodes/5024612095001/Ep.-1---Achaari-Cheese-Toast---Bachelor\'s-Delight',
+ _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",
'info_dict': {
- 'title': 'Ep. 1 - Achaari Cheese Toast - Bachelor\'s Delight',
+ 'title': "Ep. 1 - Achaari Cheese Toast - Bachelor's Delight",
'id': '5024612095001',
'ext': 'mp4',
'upload_date': '20160707',
- 'description': 'Bachelor\'s Delight is a new food show from Sony LIV to satisfy the taste buds of all those bachelors looking for a quick bite.',
+ 'description': 'md5:7f28509a148d5be9d0782b4d5106410d',
'uploader_id': '4338955589001',
'timestamp': 1467870968,
},
@@ -21,8 +21,14 @@ class SonyLIVIE(InfoExtractor):
'skip_download': True,
},
'add_ie': ['BrightcoveNew'],
- }
+ }, {
+ 'url': 'http://www.sonyliv.com/details/full%20movie/4951168986001/Sei-Raat-(Bangla)',
+ 'only_matching': True,
+ }]
+
BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/4338955589001/default_default/index.html?videoId=%s'
def _real_extract(self, url):
- return self.url_result(self.BRIGHTCOVE_URL_TEMPLATE % self._match_id(url), 'BrightcoveNew')
+ brightcove_id = self._match_id(url)
+ return self.url_result(
+ self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id, 'BrightcoveNew', brightcove_id)