[ie/locipo] Clean up _download_json block

pull/13656/head
gravesducking 1 month ago
parent 1925bb95b7
commit 15b1211c21

@ -61,15 +61,13 @@ class LocipoIE(InfoExtractor):
if not playlist_id: if not playlist_id:
creative_data = self._download_json( creative_data = self._download_json(
url_or_request=f'https://api.locipo.jp/api/v1/creatives/{creative_id}', f'https://api.locipo.jp/api/v1/creatives/{creative_id}',
video_id=creative_id, creative_id,
headers=filter_dict( headers={
{ 'accept': 'application/json, text/plain, */*',
'accept': 'application/json, text/plain, */*', 'origin': 'https://locipo.jp',
'origin': 'https://locipo.jp', 'referer': 'https://locipo.jp/',
'referer': 'https://locipo.jp/', },
},
),
) )
return { return {
@ -93,28 +91,24 @@ class LocipoIE(InfoExtractor):
} }
playlist_data = self._download_json( playlist_data = self._download_json(
url_or_request=f'https://api.locipo.jp/api/v1/playlists/{playlist_id}', f'https://api.locipo.jp/api/v1/playlists/{playlist_id}',
video_id=playlist_id, playlist_id,
headers=filter_dict( headers={
{ 'accept': 'application/json, text/plain, */*',
'accept': 'application/json, text/plain, */*', 'origin': 'https://locipo.jp',
'origin': 'https://locipo.jp', 'referer': 'https://locipo.jp/',
'referer': 'https://locipo.jp/', },
},
),
) )
# NOTE: This API can return up to 1000 videos. Since there doesn't seem to be any playlist with more than 1000 items at the moment, pagination is currently not implemented. # NOTE: This API can return up to 1000 videos. Since there doesn't seem to be any playlist with more than 1000 items at the moment, pagination is currently not implemented.
playlist_creatives_data = self._download_json( playlist_creatives_data = self._download_json(
url_or_request=f'https://api.locipo.jp/api/v1/playlists/{playlist_id}/creatives', f'https://api.locipo.jp/api/v1/playlists/{playlist_id}/creatives',
video_id=None, None,
headers=filter_dict( headers={
{ 'accept': 'application/json, text/plain, */*',
'accept': 'application/json, text/plain, */*', 'origin': 'https://locipo.jp',
'origin': 'https://locipo.jp', 'referer': 'https://locipo.jp/',
'referer': 'https://locipo.jp/', },
},
),
) )
entries = [] entries = []

Loading…
Cancel
Save