LamiaYT commited on
Commit
db5169b
·
1 Parent(s): c5acb19
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -60,7 +60,20 @@ def extract_youtube_details(url: str) -> str:
60
 
61
  @tool
62
  def extract_youtube_details(url: str) -> str:
63
- """Extract details from YouTube videos."""
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  try:
65
  video_id = None
66
  patterns = [
 
60
 
61
  @tool
62
  def extract_youtube_details(url: str) -> str:
63
+ """
64
+ Extract details from a YouTube video URL.
65
+
66
+ This tool fetches video metadata (title, author, etc.) using the YouTube oEmbed API,
67
+ and scrapes the video page for additional details like bird species mentions and view count.
68
+
69
+ Args:
70
+ url (str): The full URL of a YouTube video (e.g., https://www.youtube.com/watch?v=VIDEO_ID).
71
+
72
+ Returns:
73
+ str: A formatted string containing extracted video information such as title, author,
74
+ bird species count (if mentioned), and number of views.
75
+ """
76
+
77
  try:
78
  video_id = None
79
  patterns = [