mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-02 16:32:51 +01:00
Update amazonminitv.py
This commit is contained in:
parent
7814598369
commit
7f36e69091
|
@ -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 @@ def _real_initialize(self):
|
||||||
|
|
||||||
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 @@ def _real_extract(self, url):
|
||||||
'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)),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user