Update amazonminitv.py

This commit is contained in:
DEVENU 2024-07-22 19:58:47 +05:30 committed by GitHub
parent 7814598369
commit 7f36e69091
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,3 @@
import json
from .common import InfoExtractor
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):
query = {
'contentId':asin,
'contentId': asin,
}
if data:
query.update(data)
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={
'Content-Type': 'application/json',
'accounttype': 'NEW_GUEST_ACCOUNT',
@ -106,11 +104,11 @@ def _real_extract(self, url):
'subtitles': subtitles,
'language': traverse_obj(title_info, ('audioTracks', 0)),
'thumbnails': [{
'id': "thumbnailImage",
'id': 'thumbnailImage',
'url': title_info.get('thumbnailImage'),
},{
'id':"seasonThumbnailImage",
'url': title_info.get('thumbnailImage')
'id':'seasonThumbnailImage',
'url': title_info.get('thumbnailImage'),
}],
'description': traverse_obj(title_info_, ('description', 'synopsis')),
'release_timestamp': int_or_none(try_get(title_info_, lambda x: x['publicReleaseDateUTC'] / 1000)),