temp2 = []
for ticker in tickers:
    if ticker not in temp:
        temp2.append(ticker)
    temp.append(ticker)

tickers = temp2

for ticker in tickers:
    print(ticker)

    s = Sentiment(ticker)
    news = s.get_news()
    stocktwits = s.get_stocktwits()
    press_releases = s.get_press_releases()
    analyst_ratings = s.get_analyst_ratings()
    insider_trading = s.get_insider_trading()
    quiver_data = s.get_quiver_data()

    # ticker_sentiment = sentiment.calculate_sentiment(f'{ticker}')
    # print(ticker_sentiment)

    cursor.execute(
        'insert into premarket_sentiment (ticker, articles, sentiment, \
        today_sentiment, messages, today_sentiment_st, sentiment_st, \
        press_releases, contracts, lobbying, congress_buys, \
        congress_sells, senate_buys, senate_sells, house_buys, \
        house_sells, insider_trades, upgrades, downgrades) \
        values (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, \
                %s, %s, %s, %s, %s, %s, %s)',
        (ticker, news['articles_today'], news['total_sentiment'],
from sentiment import Sentiment

s = Sentiment('AAPL')

print(dir(s))



results = s.get_stocktwits()
print('\n\n LAST LINE:', results)

results = s.get_insider_trading()
print('\n\n LAST LINE:', results)

results = s.get_news()
print('\n\n LAST LINE:', results)

results = s.get_press_releases()
print('\n\n LAST LINE:', results)

results = s.get_quiver_data()
print('\n\n LAST LINE:', results)

results = s.get_analyst_ratings()
print('\n\n LAST LINE:', results)