mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-09-01 16:51:39 +03:00
Update amazonminitv.py
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
import json
|
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import ExtractorError, int_or_none, traverse_obj, try_get
|
from ..utils import ExtractorError, int_or_none, traverse_obj, try_get
|
||||||
|
|
||||||
@@ -13,13 +11,13 @@ class AmazonMiniTVBaseIE(InfoExtractor):
|
|||||||
|
|
||||||
def _call_api(self, asin, data=None, note=None):
|
def _call_api(self, asin, data=None, note=None):
|
||||||
query = {
|
query = {
|
||||||
'contentId':asin,
|
'contentId': asin,
|
||||||
}
|
}
|
||||||
if data:
|
if data:
|
||||||
query.update(data)
|
query.update(data)
|
||||||
|
|
||||||
resp = self._download_json(
|
resp = self._download_json(
|
||||||
f'https://www.amazon.in/minitv-pr/api/web/page/title',
|
'https://www.amazon.in/minitv-pr/api/web/page/title',
|
||||||
asin, note=note, headers={
|
asin, note=note, headers={
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'accounttype': 'NEW_GUEST_ACCOUNT',
|
'accounttype': 'NEW_GUEST_ACCOUNT',
|
||||||
@@ -106,11 +104,11 @@ class AmazonMiniTVIE(AmazonMiniTVBaseIE):
|
|||||||
'subtitles': subtitles,
|
'subtitles': subtitles,
|
||||||
'language': traverse_obj(title_info, ('audioTracks', 0)),
|
'language': traverse_obj(title_info, ('audioTracks', 0)),
|
||||||
'thumbnails': [{
|
'thumbnails': [{
|
||||||
'id': "thumbnailImage",
|
'id': 'thumbnailImage',
|
||||||
'url': title_info.get('thumbnailImage'),
|
'url': title_info.get('thumbnailImage'),
|
||||||
},{
|
},{
|
||||||
'id':"seasonThumbnailImage",
|
'id':'seasonThumbnailImage',
|
||||||
'url': title_info.get('thumbnailImage')
|
'url': title_info.get('thumbnailImage'),
|
||||||
}],
|
}],
|
||||||
'description': traverse_obj(title_info_, ('description', 'synopsis')),
|
'description': traverse_obj(title_info_, ('description', 'synopsis')),
|
||||||
'release_timestamp': int_or_none(try_get(title_info_, lambda x: x['publicReleaseDateUTC'] / 1000)),
|
'release_timestamp': int_or_none(try_get(title_info_, lambda x: x['publicReleaseDateUTC'] / 1000)),
|
||||||
|
|||||||
Reference in New Issue
Block a user