Update aggregator.py
Browse files- aggregator.py +10 -0
aggregator.py
CHANGED
@@ -13,34 +13,44 @@ def get_articles_sentiment(ticker, model):
|
|
13 |
# getting a list of article of given ticket from different sources
|
14 |
try:
|
15 |
bezinga_list = bezinga_get(ticker)
|
|
|
16 |
bezinga_results = pipe(bezinga_list)
|
|
|
17 |
except Exception as e:
|
18 |
print(e)
|
19 |
bezinga_results = []
|
20 |
|
21 |
try:
|
22 |
newsapi_list = get_newsapi(ticker)
|
|
|
23 |
newsapi_results = pipe(newsapi_list)
|
|
|
24 |
except Exception as e:
|
25 |
print(e)
|
26 |
newsapi_results = []
|
27 |
try:
|
28 |
newsdata_list = get_newsdata(ticker)
|
|
|
29 |
newsdata_results = pipe(newsdata_list)
|
|
|
30 |
except Exception as e:
|
31 |
print(e)
|
32 |
newsdata_results = []
|
33 |
|
34 |
try:
|
35 |
finhub_list = get_finhub(ticker)
|
|
|
36 |
finhub_results = pipe(finhub_list)
|
|
|
37 |
except Exception as e:
|
38 |
print(e)
|
39 |
finhub_results = []
|
40 |
|
41 |
try:
|
42 |
vantage_list = get_vantage(ticker)
|
|
|
43 |
vantage_results = pipe(vantage_list)
|
|
|
44 |
except Exception as e:
|
45 |
print(e)
|
46 |
vantage_results = []
|
|
|
13 |
# getting a list of article of given ticket from different sources
|
14 |
try:
|
15 |
bezinga_list = bezinga_get(ticker)
|
16 |
+
print("BEZINGA returned")
|
17 |
bezinga_results = pipe(bezinga_list)
|
18 |
+
print("evaluated")
|
19 |
except Exception as e:
|
20 |
print(e)
|
21 |
bezinga_results = []
|
22 |
|
23 |
try:
|
24 |
newsapi_list = get_newsapi(ticker)
|
25 |
+
print("NEWSAPI returned")
|
26 |
newsapi_results = pipe(newsapi_list)
|
27 |
+
print("evaluated")
|
28 |
except Exception as e:
|
29 |
print(e)
|
30 |
newsapi_results = []
|
31 |
try:
|
32 |
newsdata_list = get_newsdata(ticker)
|
33 |
+
print("NEWSDATA returned")
|
34 |
newsdata_results = pipe(newsdata_list)
|
35 |
+
print("evaluated")
|
36 |
except Exception as e:
|
37 |
print(e)
|
38 |
newsdata_results = []
|
39 |
|
40 |
try:
|
41 |
finhub_list = get_finhub(ticker)
|
42 |
+
print("FINHUB returned")
|
43 |
finhub_results = pipe(finhub_list)
|
44 |
+
print("evaluated")
|
45 |
except Exception as e:
|
46 |
print(e)
|
47 |
finhub_results = []
|
48 |
|
49 |
try:
|
50 |
vantage_list = get_vantage(ticker)
|
51 |
+
print("VANTAGE returned")
|
52 |
vantage_results = pipe(vantage_list)
|
53 |
+
print("evaluated")
|
54 |
except Exception as e:
|
55 |
print(e)
|
56 |
vantage_results = []
|