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
|
import server.app
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
connector = RedditConnector()
|
server.app.app.run(debug=True)
|
||||||
|
|
||||||
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("---")
|
|
||||||
Reference in New Issue
Block a user