使Flask每小时更新一次渲染的HTML页面?

时间:2020-03-29 02:00:00

标签: python flask

我正在实施一个Web抓取网站,并使用Flask呈现HTML。

如何设置它,使其运行并更新渲染的网页(例如每小时一次)?

这是我到目前为止所做的:

"# Last bit of the code is here which works well otherwise

    print(df)

    @app.route('/')
    @app.route('/corona')
    def corona():
        return render_template('corona.html',  tables=[df.to_html(classes='female')], titles=df.columns.values)


    if __name__ == '__main__':
      app.run(debug=True)"

0 个答案:

没有答案
相关问题