Spaces:
Runtime error
Runtime error
macrdel
commited on
Commit
•
e42331d
1
Parent(s):
7773141
update src.py
Browse files- app/src/src.py +2 -2
app/src/src.py
CHANGED
@@ -17,7 +17,7 @@ def get_video_id(url_video):
|
|
17 |
|
18 |
def get_comments(api_key, video_id):
|
19 |
"""Get comments"""
|
20 |
-
endpoint = "https://www.
|
21 |
params = {
|
22 |
"part":"snippet",
|
23 |
"videoId": video_id,
|
@@ -30,7 +30,7 @@ def get_comments(api_key, video_id):
|
|
30 |
if "items" in res.keys():
|
31 |
return {
|
32 |
num: {
|
33 |
-
"
|
34 |
x["snippet"]["topLevelComment"]["snippet"][
|
35 |
"textOriginal"
|
36 |
].splitlines()
|
|
|
17 |
|
18 |
def get_comments(api_key, video_id):
|
19 |
"""Get comments"""
|
20 |
+
endpoint = "https://www.googleapis.com/youtube/v3/commentThreads"
|
21 |
params = {
|
22 |
"part":"snippet",
|
23 |
"videoId": video_id,
|
|
|
30 |
if "items" in res.keys():
|
31 |
return {
|
32 |
num: {
|
33 |
+
"text_comment": " ".join(
|
34 |
x["snippet"]["topLevelComment"]["snippet"][
|
35 |
"textOriginal"
|
36 |
].splitlines()
|