Automatisation / duck.py
FreudArthur's picture
Refactor project structure and update configurations for n8n automation
a63e449
Raw History Blame Contribute Delete
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"))