update main.py to launch flask app
This commit is contained in:
10
main.py
10
main.py
@@ -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)
|
||||
Reference in New Issue
Block a user