mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-07 01:41:17 +00:00
fix wrong reddit api keys warning
This commit is contained in:
@@ -60,6 +60,12 @@ def watchlist(l_args):
|
||||
password=cfg.API_REDDIT_PASSWORD,
|
||||
)
|
||||
|
||||
try:
|
||||
praw_api.user.me()
|
||||
except Exception:
|
||||
print("REDDIT API Keys are incorrect\n")
|
||||
return
|
||||
|
||||
dt_last_time_market_close = get_last_time_market_was_open(
|
||||
datetime.now() - timedelta(hours=24)
|
||||
)
|
||||
@@ -237,6 +243,12 @@ def popular_tickers(l_args):
|
||||
password=cfg.API_REDDIT_PASSWORD,
|
||||
)
|
||||
|
||||
try:
|
||||
praw_api.user.me()
|
||||
except Exception:
|
||||
print("REDDIT API Keys are incorrect\n")
|
||||
return
|
||||
|
||||
psaw_api = PushshiftAPI()
|
||||
|
||||
for s_sub_reddit in l_sub_reddits:
|
||||
@@ -400,6 +412,12 @@ def spac_community(l_args):
|
||||
password=cfg.API_REDDIT_PASSWORD,
|
||||
)
|
||||
|
||||
try:
|
||||
praw_api.user.me()
|
||||
except Exception:
|
||||
print("REDDIT API Keys are incorrect\n")
|
||||
return
|
||||
|
||||
d_submission = {}
|
||||
d_watchlist_tickers = {}
|
||||
l_watchlist_links = list()
|
||||
@@ -523,6 +541,12 @@ def spac(l_args):
|
||||
password=cfg.API_REDDIT_PASSWORD,
|
||||
)
|
||||
|
||||
try:
|
||||
praw_api.user.me()
|
||||
except Exception:
|
||||
print("REDDIT API Keys are incorrect\n")
|
||||
return
|
||||
|
||||
d_submission = {}
|
||||
d_watchlist_tickers = {}
|
||||
l_watchlist_links = list()
|
||||
@@ -667,6 +691,12 @@ def wsb_community(l_args):
|
||||
password=cfg.API_REDDIT_PASSWORD,
|
||||
)
|
||||
|
||||
try:
|
||||
praw_api.user.me()
|
||||
except Exception:
|
||||
print("REDDIT API Keys are incorrect\n")
|
||||
return
|
||||
|
||||
d_submission = {}
|
||||
l_watchlist_links = list()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user