Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,7 +45,7 @@ def scrape_comments(video_id):
|
|
| 45 |
|
| 46 |
# Function to fetch video metadata using YouTube API
|
| 47 |
def fetch_video_info(video_id):
|
| 48 |
-
video_id = extract_video_id(
|
| 49 |
|
| 50 |
request = youtube.videos().list(
|
| 51 |
part="snippet",
|
|
@@ -159,7 +159,7 @@ def main():
|
|
| 159 |
comments_df['sentiment'] = comments_df['comment'].apply(lambda x: analyze_sentiment(x[:512]))
|
| 160 |
sentiment_counts = comments_df['sentiment'].value_counts()
|
| 161 |
|
| 162 |
-
channel_name, video_title = fetch_video_info(
|
| 163 |
|
| 164 |
st.write(f"**Channel Name:** {channel_name}")
|
| 165 |
st.write(f"**Video Description:** {video_title}")
|
|
|
|
| 45 |
|
| 46 |
# Function to fetch video metadata using YouTube API
|
| 47 |
def fetch_video_info(video_id):
|
| 48 |
+
# video_id = extract_video_id(video_url)
|
| 49 |
|
| 50 |
request = youtube.videos().list(
|
| 51 |
part="snippet",
|
|
|
|
| 159 |
comments_df['sentiment'] = comments_df['comment'].apply(lambda x: analyze_sentiment(x[:512]))
|
| 160 |
sentiment_counts = comments_df['sentiment'].value_counts()
|
| 161 |
|
| 162 |
+
channel_name, video_title = fetch_video_info(video_url)
|
| 163 |
|
| 164 |
st.write(f"**Channel Name:** {channel_name}")
|
| 165 |
st.write(f"**Video Description:** {video_title}")
|