Spaces:
Runtime error
Runtime error
ahmedJaafari
commited on
Commit
•
5215aa8
1
Parent(s):
37285b4
Update app.py
Browse files
app.py
CHANGED
@@ -31,13 +31,10 @@ def get_videos(URL, channel_id, pageToken=None, maxResults=20):
|
|
31 |
def get_all_videos(URL, channel_id):
|
32 |
videos = []
|
33 |
pageToken = None
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
pageToken = response.get("nextPageToken")
|
39 |
-
if not pageToken:
|
40 |
-
break
|
41 |
return videos
|
42 |
|
43 |
def submit_video(video_url):
|
|
|
31 |
def get_all_videos(URL, channel_id):
|
32 |
videos = []
|
33 |
pageToken = None
|
34 |
+
response = get_videos(URL, channel_id, pageToken)
|
35 |
+
for item in response["items"]:
|
36 |
+
videos.append(item["id"]["videoId"])
|
37 |
+
pageToken = response.get("nextPageToken")
|
|
|
|
|
|
|
38 |
return videos
|
39 |
|
40 |
def submit_video(video_url):
|