mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-09 19:00:39 +00:00
parent
11078c6d57
commit
c418e6b5a6
@ -329,7 +329,8 @@ class ViuOTTIE(InfoExtractor):
|
|||||||
if token is not None:
|
if token is not None:
|
||||||
query['identity'] = token
|
query['identity'] = token
|
||||||
else:
|
else:
|
||||||
# preview is limited to 3min for non-members. But we can try to bypass it
|
# The content is Preview or for VIP only.
|
||||||
|
# We can try to bypass the duration which is limited to 3mins only
|
||||||
duration_limit, query['duration'] = True, '180'
|
duration_limit, query['duration'] = True, '180'
|
||||||
try:
|
try:
|
||||||
stream_data = download_playback()
|
stream_data = download_playback()
|
||||||
@ -346,13 +347,13 @@ class ViuOTTIE(InfoExtractor):
|
|||||||
|
|
||||||
# bypass preview duration limit
|
# bypass preview duration limit
|
||||||
if duration_limit:
|
if duration_limit:
|
||||||
stream_url = urllib.parse.urlparse(stream_url)
|
old_stream_url = urllib.parse.urlparse(stream_url)
|
||||||
|
query = dict(urllib.parse.parse_qsl(old_stream_url.query, keep_blank_values=True))
|
||||||
query.update({
|
query.update({
|
||||||
'duration': video_data.get('time_duration') or '9999999',
|
'duration': video_data.get('time_duration') or '9999999',
|
||||||
'duration_start': '0',
|
'duration_start': '0',
|
||||||
})
|
})
|
||||||
stream_url = stream_url._replace(query=urllib.parse.urlencode(dict(
|
stream_url = old_stream_url._replace(query=urllib.parse.urlencode(query)).geturl()
|
||||||
urllib.parse.parse_qsl(stream_url.query, keep_blank_values=True)))).geturl()
|
|
||||||
|
|
||||||
formats.append({
|
formats.append({
|
||||||
'format_id': vid_format,
|
'format_id': vid_format,
|
||||||
|
Loading…
Reference in New Issue
Block a user