我正在实施一个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)"