mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-18 19:28:31 +00:00
[ie/locipo] Clean up _download_json block
This commit is contained in:
parent
1925bb95b7
commit
15b1211c21
@ -61,15 +61,13 @@ def _real_extract(self, url: str):
|
|||||||
|
|
||||||
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 @@ def _real_extract(self, url: str):
|
|||||||
}
|
}
|
||||||
|
|
||||||
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…
Reference in New Issue
Block a user