Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -194,12 +194,12 @@ with main_page:
|
|
| 194 |
if (st.session_state.rerun_button == "QUERYING") and (st.session_state["video_link"] is not None):
|
| 195 |
with st.spinner('Querying comments and running models'):
|
| 196 |
yt_parser = st.session_state["YouTubeParser"]
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
|
| 204 |
# Run formatting and models
|
| 205 |
try:
|
|
|
|
| 194 |
if (st.session_state.rerun_button == "QUERYING") and (st.session_state["video_link"] is not None):
|
| 195 |
with st.spinner('Querying comments and running models'):
|
| 196 |
yt_parser = st.session_state["YouTubeParser"]
|
| 197 |
+
try:
|
| 198 |
+
yt_parser.scrape_comments(st.session_state['video_link'])
|
| 199 |
+
yt_parser.scrape_video_title()
|
| 200 |
+
except:
|
| 201 |
+
st.error("Error: Unable to query comments, incorrect YouTube URL.")
|
| 202 |
+
st.stop()
|
| 203 |
|
| 204 |
# Run formatting and models
|
| 205 |
try:
|