projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[acast] Extract more metadata
[youtube-dl]
/
youtube_dl
/
extractor
/
sonyliv.py
diff --git
a/youtube_dl/extractor/sonyliv.py
b/youtube_dl/extractor/sonyliv.py
index c717b1f4d09dde0a161750303efa84cce436d45a..58a8c0d4ddb2f282241af2afad37e9d4b8403085 100644
(file)
--- a/
youtube_dl/extractor/sonyliv.py
+++ b/
youtube_dl/extractor/sonyliv.py
@@
-2,27
+2,39
@@
from __future__ import unicode_literals
from .common import InfoExtractor
from __future__ import unicode_literals
from .common import InfoExtractor
+from ..utils import smuggle_url
class SonyLIVIE(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'http
s?://(?:www\.)?sonyliv\.com/details/[^/]+/(?P<id>\d+)
'
+ _TEST
S = [
{
+ 'url':
"http://www.sonyliv.com/details/episodes/5024612095001/Ep.-1---Achaari-Cheese-Toast---Bachelor's-Delight"
,
'info_dict': {
'info_dict': {
- 'title':
'Ep. 1 - Achaari Cheese Toast - Bachelor\'s Delight'
,
- 'id': '5024612095001',
+ 'title':
"Ep. 1 - Achaari Cheese Toast - Bachelor's Delight"
,
+ 'id': '
ref:
5024612095001',
'ext': 'mp4',
'ext': 'mp4',
- 'upload_date': '201
60707
',
- '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.
',
- 'uploader_id': '
4338955589
001',
- 'timestamp': 1
467870968
,
+ 'upload_date': '201
70923
',
+ 'description': '
md5:7f28509a148d5be9d0782b4d5106410d
',
+ 'uploader_id': '
5182475815
001',
+ 'timestamp': 1
506200547
,
},
'params': {
'skip_download': True,
},
'add_ie': ['BrightcoveNew'],
},
'params': {
'skip_download': True,
},
'add_ie': ['BrightcoveNew'],
- }
- BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/4338955589001/default_default/index.html?videoId=%s'
+ }, {
+ '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'
+ BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/5182475815001/default_default/index.html?videoId=ref:%s'
def _real_extract(self, url):
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(
+ smuggle_url(self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id, {
+ 'geo_countries': ['IN'],
+ 'referrer': url,
+ }),
+ 'BrightcoveNew', brightcove_id)