1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-10 11:27:27 +00:00

[viu:ott] fix duration substitution

This commit is contained in:
lkho 2020-10-18 23:01:36 +08:00
parent 378b1c4635
commit 9960d74039

View File

@ -320,9 +320,10 @@ class ViuOTTIE(InfoExtractor):
if duration_limit: if duration_limit:
temp = compat_urlparse.urlparse(stream_url) temp = compat_urlparse.urlparse(stream_url)
query = dict(compat_urlparse.parse_qsl(temp.query, keep_blank_values=True)) query = dict(compat_urlparse.parse_qsl(temp.query, keep_blank_values=True))
time_duration = int_or_none(video_data.get('time_duration'))
query.update({ query.update({
'duration': video_data.get('time_duration', '9999999'), 'duration': time_duration if time_duration > 0 else '9999999',
'duration_start': '0' 'duration_start': '0',
}) })
stream_url = temp._replace(query=compat_urlparse.urlencode(query)).geturl() stream_url = temp._replace(query=compat_urlparse.urlencode(query)).geturl()