def scrape():
    # execute scrape funcions
    # stock_info = mongo.db.stock_info
    stock_data = scrape_stock.scrape_stock()

    # update mongo database
    # stock_info.update({}, stock_data, upsert=True)

    # redirect back to home page
    return render_template("index.html", stock_info=stock_data)
def scrape():
    global stock_data
    # execute scrape funcions
    # stock_info = mongo.db.stock_info

    # stock scraping function and store in session
    stock_data = scrape_stock.scrape_stock()

    # retrieve the value of data from session

    # update mongo database
    # stock_info.update({}, stock_data, upsert=True)

    # redirect back to home page
    return render_template("1-dashboard.html",
                           stock_info=stock_data,
                           data=data)
def scrape():
    # execute scrape funcions
    # stock_info = mongo.db.stock_info

    # stock scraping function
    stock_data = scrape_stock.scrape_stock()

    # twitter scraping function
    n = int(request.args.get('n'))
    search = request.args.get('search')
    data = hashtag.get_tweets(n, search)

    # update mongo database
    # stock_info.update({}, stock_data, upsert=True)

    # redirect back to home page
    return render_template("index.html", stock_info=stock_data, data=data)
def scrape():
    global ml_data
    global data
    global stock_data
    global predictionImages
    # global final_prediction
    # execute scrape funcions
    # stock_info = mongo.db.stock_info

    # stock scraping function and store in session
    stock_data = scrape_stock.scrape_stock()
    
    # retrieve the value of data from session
    

    # update mongo database
    # stock_info.update({}, stock_data, upsert=True)

    # redirect back to home page
    return render_template("8-stockticker-tweeter.html", stock_info=stock_data, data=data, eco_scrape_dict=ml_data, final_prediction = predictionImages[final_prediction[0][0]])