mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-25 12:50:10 +09:00
Merge e7931f35d9
into c5098961b0
This commit is contained in:
commit
2a8beaa620
@ -2,6 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import uuid
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
@ -93,7 +94,7 @@ class LiTVIE(InfoExtractor):
|
|||||||
if noplaylist_prompt:
|
if noplaylist_prompt:
|
||||||
self.to_screen('Downloading just video %s because of --no-playlist' % video_id)
|
self.to_screen('Downloading just video %s because of --no-playlist' % video_id)
|
||||||
|
|
||||||
# In browsers `getMainUrl` request is always issued. Usually this
|
# In browsers `getUrl` request is always issued. Usually this
|
||||||
# endpoint gives the same result as the data embedded in the webpage.
|
# endpoint gives the same result as the data embedded in the webpage.
|
||||||
# If georestricted, there are no embedded data, so an extra request is
|
# If georestricted, there are no embedded data, so an extra request is
|
||||||
# necessary to get the error code
|
# necessary to get the error code
|
||||||
@ -107,12 +108,12 @@ class LiTVIE(InfoExtractor):
|
|||||||
webpage, 'video data', default='{}'), video_id)
|
webpage, 'video data', default='{}'), video_id)
|
||||||
if not video_data:
|
if not video_data:
|
||||||
payload = {
|
payload = {
|
||||||
|
'type': 'noauth',
|
||||||
'assetId': program_info['assetId'],
|
'assetId': program_info['assetId'],
|
||||||
'watchDevices': program_info['watchDevices'],
|
'puid': compat_str(uuid.uuid4()),
|
||||||
'contentType': program_info['contentType'],
|
|
||||||
}
|
}
|
||||||
video_data = self._download_json(
|
video_data = self._download_json(
|
||||||
'https://www.litv.tv/vod/getMainUrl', video_id,
|
'https://www.litv.tv/vod/ajax/getUrl', video_id,
|
||||||
data=json.dumps(payload).encode('utf-8'),
|
data=json.dumps(payload).encode('utf-8'),
|
||||||
headers={'Content-Type': 'application/json'})
|
headers={'Content-Type': 'application/json'})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user