Kackle commited on
Commit
4e65abc
·
verified ·
1 Parent(s): cd135cb

Update nova_agent.py

Browse files
Files changed (1) hide show
  1. nova_agent.py +5 -8
nova_agent.py CHANGED
@@ -66,16 +66,13 @@ class NovaProAgent:
66
  url = youtube_url.group()
67
 
68
  try:
69
- # Download video using VideoParser
70
- video_path = self.video_parser.download_youtube_video(url)
71
 
72
- # Extract frames for analysis
73
- frames = self.video_parser.analyze_video_frames(video_path, sample_rate=60)
74
 
75
- # Clean up
76
- self.video_parser.cleanup()
77
-
78
- return f"Analyzed {len(frames)} frames from video. Video processing complete."
79
 
80
  except Exception as e:
81
  return f"Video analysis failed: {str(e)}"
 
66
  url = youtube_url.group()
67
 
68
  try:
69
+ # Extract video metadata without downloading
70
+ metadata = self.video_parser.get_youtube_metadata(url)
71
 
72
+ if 'error' in metadata:
73
+ return f"Video analysis failed: {metadata['error']}"
74
 
75
+ return f"Video: {metadata['title']} | Duration: {metadata['duration']}s | Views: {metadata['view_count']:,}"
 
 
 
76
 
77
  except Exception as e:
78
  return f"Video analysis failed: {str(e)}"