Update app.py
Browse files
app.py
CHANGED
|
@@ -851,6 +851,7 @@ def tool_executor(state: AgentState):
|
|
| 851 |
try:
|
| 852 |
if "www.youtube.com" in str(action.args["url"]):
|
| 853 |
video_id = action.args["url"].split("www.youtube.com/watch?v=")[-1]
|
|
|
|
| 854 |
api = YouTubeTranscriptApi()
|
| 855 |
transcript = api.fetch(video_id)
|
| 856 |
texts = [x.text for x in transcript]
|
|
|
|
| 851 |
try:
|
| 852 |
if "www.youtube.com" in str(action.args["url"]):
|
| 853 |
video_id = action.args["url"].split("www.youtube.com/watch?v=")[-1]
|
| 854 |
+
webpage_information_complete = str(video_id)
|
| 855 |
api = YouTubeTranscriptApi()
|
| 856 |
transcript = api.fetch(video_id)
|
| 857 |
texts = [x.text for x in transcript]
|