Skip to content

Commit

Permalink
examples/list-channel-videos.py: code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tombulled committed Jul 30, 2023
1 parent ff5103d commit ac90481
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/list-channel-videos.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from innertube import InnerTube


def delay():
# A random duration between 2s and 5s
secs = random.randint(2000, 5000) / 1000
Expand Down Expand Up @@ -44,9 +45,9 @@ def list_videos(channel_id=None, /, *, continuation=None):
# Fetch more videos by using the continuation token
continued_videos_data = client.browse(continuation=continuation)

contents = continued_videos_data[
"onResponseReceivedActions"
][0]["appendContinuationItemsAction"]["continuationItems"]
contents = continued_videos_data["onResponseReceivedActions"][0][
"appendContinuationItemsAction"
]["continuationItems"]

# Extract the rich video items and the continuation item
*rich_items, continuation_item = contents
Expand Down

0 comments on commit ac90481

Please sign in to comment.