update main.py to launch flask app

This commit is contained in:
2026-01-11 17:21:09 +00:00
parent 195188dcd7
commit 4d459f2035

10
main.py
View File

@@ -1,10 +1,4 @@
from connectors.reddit_connector import RedditConnector
from datetime import datetime
import server.app
if __name__ == "__main__":
connector = RedditConnector()
search_results = connector.search_subreddit("China", "all", limit=5, timeframe="month")
for post in search_results:
print(f"Title: {post.title}\nAuthor: {post.author}\nSubreddit: {post.subreddit}\nUpvotes: {post.upvotes}\nSource: {post.source}\nTimestamp: {datetime.fromtimestamp(post.timestamp)}")
print("---")
server.app.app.run(debug=True)