Spaces:
Sleeping
Sleeping
Download test_yt.py from devank2000/DT: direct link, hf CLI and curl.
- Browser
- Download file 317 Bytes
-
https://huggingface.co/spaces/devank2000/DT/resolve/main/test_yt.py
- Command line
-
hf download hf://spaces/devank2000/DT/test_yt.py
-
curl -L -o test_yt.py https://huggingface.co/spaces/devank2000/DT/resolve/main/test_yt.py
317 Bytes
| from youtube_search import YoutubeSearch | |
| import json | |
| results = YoutubeSearch("dumbbell press workout", max_results=4).to_json() | |
| data = json.loads(results) | |
| for v in data["videos"]: | |
| print("Title:", v.get("title")) | |
| print("url_suffix:", v.get("url_suffix")) | |
| print("id:", v.get("id", "N/A")) | |
| print("---") | |