projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[amcnetworks] Recognize more BBC America URLs
[youtube-dl]
/
youtube_dl
/
extractor
/
vlive.py
diff --git
a/youtube_dl/extractor/vlive.py
b/youtube_dl/extractor/vlive.py
index 147f52d458f9e9660a77f40cc6aac15ef4b2f0d7..acf9fda487f6143906b8162a158c1cf9f53fec68 100644
(file)
--- a/
youtube_dl/extractor/vlive.py
+++ b/
youtube_dl/extractor/vlive.py
@@
-9,6
+9,7
@@
from ..utils import (
ExtractorError,
float_or_none,
int_or_none,
ExtractorError,
float_or_none,
int_or_none,
+ remove_start,
)
from ..compat import compat_urllib_parse_urlencode
)
from ..compat import compat_urllib_parse_urlencode
@@
-16,7
+17,7
@@
from ..compat import compat_urllib_parse_urlencode
class VLiveIE(InfoExtractor):
IE_NAME = 'vlive'
_VALID_URL = r'https?://(?:(?:www|m)\.)?vlive\.tv/video/(?P<id>[0-9]+)'
class VLiveIE(InfoExtractor):
IE_NAME = 'vlive'
_VALID_URL = r'https?://(?:(?:www|m)\.)?vlive\.tv/video/(?P<id>[0-9]+)'
- _TEST
=
{
+ _TEST
S = [
{
'url': 'http://www.vlive.tv/video/1326',
'md5': 'cc7314812855ce56de70a06a27314983',
'info_dict': {
'url': 'http://www.vlive.tv/video/1326',
'md5': 'cc7314812855ce56de70a06a27314983',
'info_dict': {
@@
-26,7
+27,20
@@
class VLiveIE(InfoExtractor):
'creator': "Girl's Day",
'view_count': int,
},
'creator': "Girl's Day",
'view_count': int,
},
- }
+ }, {
+ 'url': 'http://www.vlive.tv/video/16937',
+ 'info_dict': {
+ 'id': '16937',
+ 'ext': 'mp4',
+ 'title': '[V LIVE] 첸백시 걍방',
+ 'creator': 'EXO',
+ 'view_count': int,
+ 'subtitles': 'mincount:12',
+ },
+ 'params': {
+ 'skip_download': True,
+ },
+ }]
def _real_extract(self, url):
video_id = self._match_id(url)
def _real_extract(self, url):
video_id = self._match_id(url)
@@
-39,6
+53,7
@@
class VLiveIE(InfoExtractor):
webpage, 'video params')
status, _, _, live_params, long_video_id, key = re.split(
r'"\s*,\s*"', video_params)[2:8]
webpage, 'video params')
status, _, _, live_params, long_video_id, key = re.split(
r'"\s*,\s*"', video_params)[2:8]
+ status = remove_start(status, 'PRODUCT_')
if status == 'LIVE_ON_AIR' or status == 'BIG_EVENT_ON_AIR':
live_params = self._parse_json('"%s"' % live_params, video_id)
if status == 'LIVE_ON_AIR' or status == 'BIG_EVENT_ON_AIR':
live_params = self._parse_json('"%s"' % live_params, video_id)
@@
-114,7
+129,7
@@
class VLiveIE(InfoExtractor):
subtitles = {}
for caption in playinfo.get('captions', {}).get('list', []):
subtitles = {}
for caption in playinfo.get('captions', {}).get('list', []):
- lang = dict_get(caption, ('l
anguage', 'local
e', 'country', 'label'))
+ lang = dict_get(caption, ('l
ocale', 'languag
e', 'country', 'label'))
if lang and caption.get('source'):
subtitles[lang] = [{
'ext': 'vtt',
if lang and caption.get('source'):
subtitles[lang] = [{
'ext': 'vtt',