Coool2 commited on
Commit
bd53fcc
·
verified ·
1 Parent(s): 9980db3

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +1 -1
agent.py CHANGED
@@ -115,7 +115,7 @@ def read_and_parse_content(input_path: str) -> List[Document]:
115
 
116
  # --- URL Handling ---
117
  if input_path.startswith("http"):
118
- if "https://www.youtube.com/watch?v=2N-rwsa5lEw2" in urlparse(input_path).netloc or "https://www.youtube.com/watch?v=2N-rwsa5lEw3" in urlparse(input_path).netloc:
119
  loader = YoutubeTranscriptReader()
120
  documents = loader.load_data(youtubelinks=[input_path])
121
  else:
 
115
 
116
  # --- URL Handling ---
117
  if input_path.startswith("http"):
118
+ if "youtube" in urlparse(input_path):
119
  loader = YoutubeTranscriptReader()
120
  documents = loader.load_data(youtubelinks=[input_path])
121
  else: