mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-03 09:40:30 +00:00
[vlive] Remove upload_date extraction & cleanup
This commit is contained in:
parent
061f62da54
commit
eba470f2f2
@ -25,7 +25,6 @@ class VLiveIE(InfoExtractor):
|
|||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': '[V] Girl\'s Day\'s Broadcast',
|
'title': '[V] Girl\'s Day\'s Broadcast',
|
||||||
'creator': 'Girl\'s Day',
|
'creator': 'Girl\'s Day',
|
||||||
'upload_date': '20150817',
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
_SECRET = 'rFkwZet6pqk1vQt6SxxUkAHX7YL3lmqzUMrU4IDusTo4jEBdtOhNfT4BYYAdArwH'
|
_SECRET = 'rFkwZet6pqk1vQt6SxxUkAHX7YL3lmqzUMrU4IDusTo4jEBdtOhNfT4BYYAdArwH'
|
||||||
@ -41,21 +40,14 @@ def _real_extract(self, url):
|
|||||||
thumbnail = self._og_search_thumbnail(webpage)
|
thumbnail = self._og_search_thumbnail(webpage)
|
||||||
creator = self._html_search_regex(
|
creator = self._html_search_regex(
|
||||||
r'<span class="name">([^<>]+)</span>', webpage, 'creator')
|
r'<span class="name">([^<>]+)</span>', webpage, 'creator')
|
||||||
upload_date = self._html_search_regex(
|
|
||||||
r'<span class="time">(\d{4}\.\d{2}\.\d{2})</span>', webpage,
|
|
||||||
'upload date', default=None, fatal=False)
|
|
||||||
if upload_date:
|
|
||||||
upload_date = upload_date.replace('.', '')
|
|
||||||
|
|
||||||
url = 'http://global.apis.naver.com/globalV/globalV/vod/%s/playinfo?' % video_id
|
url = 'http://global.apis.naver.com/globalV/globalV/vod/%s/playinfo?' % video_id
|
||||||
msgpad = {'msgpad': '%.0f' % (time() * 1000)}
|
msgpad = '%.0f' % (time() * 1000)
|
||||||
md = {
|
md = b64encode(
|
||||||
'md': b64encode(
|
|
||||||
hmac.new(self._SECRET.encode('ascii'),
|
hmac.new(self._SECRET.encode('ascii'),
|
||||||
(url[:255] + msgpad['msgpad']).encode('ascii'), sha1).digest())
|
(url[:255] + msgpad).encode('ascii'), sha1).digest()
|
||||||
}
|
)
|
||||||
url += '&' + compat_urllib_parse.urlencode(msgpad) + '&' + compat_urllib_parse.urlencode(md)
|
url += '&' + compat_urllib_parse.urlencode({'msgpad': msgpad, 'md': md})
|
||||||
|
|
||||||
playinfo = self._download_json(url, video_id, 'Downloading video json')
|
playinfo = self._download_json(url, video_id, 'Downloading video json')
|
||||||
|
|
||||||
if playinfo.get('message', '') != 'success':
|
if playinfo.get('message', '') != 'success':
|
||||||
@ -89,6 +81,5 @@ def _real_extract(self, url):
|
|||||||
'creator': creator,
|
'creator': creator,
|
||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'upload_date': upload_date,
|
|
||||||
'subtitles': subtitles,
|
'subtitles': subtitles,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user