mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-29 12:43:48 +00:00
Added helpful messages to twitter model (#1622)
* Added helpful messages * ran black on file Co-authored-by: Chavithra <chavithra@gmail.com>
This commit is contained in:
@@ -80,6 +80,22 @@ def load_analyze_tweets(
|
||||
This means you are requesting data from beyond the API's 7 day limit"""
|
||||
)
|
||||
return pd.DataFrame()
|
||||
elif response.status_code == 403:
|
||||
console.print(
|
||||
f"""
|
||||
Status code 403.
|
||||
It seems you're twitter credentials are invalid - {response.text}
|
||||
"""
|
||||
)
|
||||
return pd.DataFrame()
|
||||
else:
|
||||
console.print(
|
||||
f"""
|
||||
Status code {response.status_code}.
|
||||
Something went wrong - {response.text}
|
||||
"""
|
||||
)
|
||||
return pd.DataFrame()
|
||||
|
||||
sentiments = []
|
||||
pos = []
|
||||
|
||||
Reference in New Issue
Block a user