Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def get_stock_news(symbol: str)-> str: #it's import to specify the return type
|
|
28 |
data = response.json()
|
29 |
|
30 |
if "data" in data and len(data["data"]) > 0:
|
31 |
-
|
32 |
else:
|
33 |
return None
|
34 |
|
|
|
28 |
data = response.json()
|
29 |
|
30 |
if "data" in data and len(data["data"]) > 0:
|
31 |
+
return data["data"][0].get("description", "No description available")
|
32 |
else:
|
33 |
return None
|
34 |
|