Update news_data.py
Browse files- news_data.py +1 -4
news_data.py
CHANGED
@@ -27,10 +27,7 @@ def cache_news():
|
|
27 |
data.append((url, label, json.dumps(feed)))
|
28 |
except Exception as e:
|
29 |
print(f"Failed to fetch {label} from {url}: {e}")
|
30 |
-
|
31 |
-
with open("data.json", "w") as f:
|
32 |
-
f.write(json.dumps(data))
|
33 |
-
|
34 |
database.insert(data)
|
35 |
|
36 |
|
|
|
27 |
data.append((url, label, json.dumps(feed)))
|
28 |
except Exception as e:
|
29 |
print(f"Failed to fetch {label} from {url}: {e}")
|
30 |
+
|
|
|
|
|
|
|
31 |
database.insert(data)
|
32 |
|
33 |
|