Spaces:
Runtime error
Runtime error
debug 4
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import pandas as pd
|
|
5 |
import re
|
6 |
|
7 |
pd.set_option("display.max_colwidth", -1)
|
8 |
-
def extract_all_comments(video_id,page_token='',comments_list =[]):
|
9 |
print("after 9")
|
10 |
request = youtube.commentThreads().list(part = ['id','snippet'],
|
11 |
maxResults = 100,videoId = video_id ,pageToken= page_token)
|
@@ -26,7 +26,7 @@ def extract_all_comments(video_id,page_token='',comments_list =[]):
|
|
26 |
if len(comments_list) < 500:
|
27 |
print("getting next batch of comments")
|
28 |
st.info('getting next batch of comments')
|
29 |
-
extract_all_comments(video_id = video_id,page_token= response['nextPageToken'],comments_list= comments_list)
|
30 |
else:
|
31 |
print("Limiting results for speed up")
|
32 |
st.info('Limiting results for speed up')
|
|
|
5 |
import re
|
6 |
|
7 |
pd.set_option("display.max_colwidth", -1)
|
8 |
+
def extract_all_comments(video_id,youtube,page_token='',comments_list =[]):
|
9 |
print("after 9")
|
10 |
request = youtube.commentThreads().list(part = ['id','snippet'],
|
11 |
maxResults = 100,videoId = video_id ,pageToken= page_token)
|
|
|
26 |
if len(comments_list) < 500:
|
27 |
print("getting next batch of comments")
|
28 |
st.info('getting next batch of comments')
|
29 |
+
extract_all_comments(video_id = video_id,youtube = youtube,page_token= response['nextPageToken'],comments_list= comments_list)
|
30 |
else:
|
31 |
print("Limiting results for speed up")
|
32 |
st.info('Limiting results for speed up')
|