Switch RSS feed storage to MongoDB

This commit is contained in:
2025-06-02 13:46:05 +02:00
parent 8ad98c4cb4
commit 933971c2e0
7 changed files with 64 additions and 56 deletions

View File

@@ -48,7 +48,12 @@ def main():
if os.path.exists(rss_feeds_file):
with open(rss_feeds_file, 'r') as f:
rss_feeds = json.load(f)
upload_rss_feeds(rss_feeds, os.getenv('DYNAMODB_TABLE_NAME'))
upload_rss_feeds(
rss_feeds,
os.getenv('MONGODB_URL'),
os.getenv('MONGODB_DB_NAME'),
os.getenv('MONGODB_COLLECTION_NAME', 'rss_feeds')
)
else:
print(f"WARNING: {rss_feeds_file} not found. Skipping RSS feed upload.")