Spaces:
Runtime error
Runtime error
Download duck.py from FreudArthur/Automatisation: direct link, hf CLI and curl.
- Browser
- Download file 363 Bytes
-
https://huggingface.co/spaces/FreudArthur/Automatisation/resolve/main/duck.py
- Command line
-
hf download hf://spaces/FreudArthur/Automatisation/duck.py
-
curl -L -o duck.py https://huggingface.co/spaces/FreudArthur/Automatisation/resolve/main/duck.py
363 Bytes
| import requests | |
| url = "https://api.duckduckgo.com/" | |
| params = { | |
| "q": "DuckDuckGo", | |
| "format": "json", | |
| "no_html": 1, | |
| "t": "my_test_app" | |
| } | |
| response = requests.get(url, params=params) | |
| data = response.json() | |
| # Safely print out the topic abstract summary | |
| print("Abstract Text:", data.get("AbstractText")) | |
| print("Source URL:", data.get("AbstractURL")) | |