Skip to content

Commit

Permalink
Fix missing field
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck committed Dec 22, 2023
1 parent f4c5eb5 commit 3e4d885
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions redesc/api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import contextlib
import logging
from typing import Any, cast

Expand Down Expand Up @@ -66,8 +65,10 @@ def get_playlist_items(
)
.execute()
)
with contextlib.suppress(IndexError):
try:
item["snippet"].update(data["items"][0]["snippet"])
except IndexError:
item["snippet"].update(tags=[])
if page_idx == pages_to_fetch:
page_items = page_items[:last_page_limit]
items.extend(page_items)
Expand Down

0 comments on commit 3e4d885

Please sign in to comment.