资源简介

Python爬虫、Flask框架与ECharts实现数据可视化,源码无错误!希望大家可以好好学习,用好资源,原创,搬运请表明来源,谢谢!又不足请大佬们指正!

资源截图

代码片段和文件信息

from flask import Flaskrender_template
import sqlite3

app = Flask(__name__)


@app.route(‘/‘)
def index():
    return render_template(“index.html“)


@app.route(‘/index‘)
def home():
    #return render_template(“index.html“)
    return index()


@app.route(‘/movie‘)
def movie():
    datalist  = []
    con = sqlite3.connect(“movie.db“)
    cur = con.cursor()
    sql = “select * from movie250“
    data = cur.execute(sql)
    for item in data:
        datalist.append(item)
    cur.close()
    con.close()
    print(datalist)
    return render_template(“movie.html“movies = datalist)



@app.route(‘/score‘)
def score():
    score = []  #评分
    num = []    #每个评分所统计出的电影数量
    con = sqlite3.connect(“movie.db“)
    cur = con.cursor()
    sql = “select scorecount(score) from movie250 group by score“
    data = cur.execute(sql)
    for item in data:
        score.append(str(item[0]))
        num.append(item[1])

    cur.close()
    con.close()
    return render_template(“score.html“score= scorenum=num)


@app.route(‘/word‘)
def word():
    return render_template(“word.html“)

@app.route(‘/team‘)
def team():
    return render_template(“team.html“)


if __name__ == ‘__main__‘:
    app.run()

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        553  2020-06-19 11:07  douban_flask\.idea\douban_flask.iml

     文件        174  2020-06-19 11:07  douban_flask\.idea\inspectionProfiles\profiles_settings.xml

     文件        294  2020-06-19 11:07  douban_flask\.idea\misc.xml

     文件        283  2020-06-19 11:07  douban_flask\.idea\modules.xml

     文件       5240  2020-06-19 11:44  douban_flask\.idea\workspace.xml

     文件       2787  2020-03-24 17:39  douban_flask\douban_flask\.idea\dataSources\f8992ce1-af87-476e-9624-b2c980d51dc7.xml

     文件        847  2020-03-11 10:19  douban_flask\douban_flask\.idea\dataSources.local.xml

     文件        481  2020-03-11 10:19  douban_flask\douban_flask\.idea\dataSources.xml

     文件        747  2020-03-07 19:49  douban_flask\douban_flask\.idea\douban_flask.iml

     文件        174  2020-03-07 15:14  douban_flask\douban_flask\.idea\inspectionProfiles\profiles_settings.xml

     文件        294  2020-03-07 19:49  douban_flask\douban_flask\.idea\misc.xml

     文件        283  2020-03-07 15:14  douban_flask\douban_flask\.idea\modules.xml

     文件      18864  2020-03-24 17:39  douban_flask\douban_flask\.idea\workspace.xml

     文件       1293  2020-03-13 08:57  douban_flask\douban_flask\app.py

     文件       1989  2020-03-07 19:17  douban_flask\douban_flask\bar-simple.html

     文件       5514  2020-06-19 11:10  douban_flask\douban_flask\index.html

     文件     110592  2020-03-10 13:25  douban_flask\douban_flask\movie.db

     文件       4782  2020-03-13 08:57  douban_flask\douban_flask\movie.html

     文件       4906  2020-03-07 19:23  douban_flask\douban_flask\score.html

     文件      24081  2020-02-10 12:53  douban_flask\douban_flask\static\assets\css\style.css

     文件     159900  2020-02-06 13:09  douban_flask\douban_flask\static\assets\img\about.jpg

     文件       1738  2020-02-06 13:09  douban_flask\douban_flask\static\assets\img\apple-touch-icon.png

     文件        491  2020-02-06 13:09  douban_flask\douban_flask\static\assets\img\favicon.png

     文件      75976  2020-02-06 13:09  douban_flask\douban_flask\static\assets\img\portfolio\portfolio-1.jpg

     文件      46201  2020-02-06 13:09  douban_flask\douban_flask\static\assets\img\portfolio\portfolio-2.jpg

     文件      55873  2020-02-06 13:09  douban_flask\douban_flask\static\assets\img\portfolio\portfolio-3.jpg

     文件      27697  2020-02-06 13:09  douban_flask\douban_flask\static\assets\img\portfolio\portfolio-4.jpg

     文件      81363  2020-02-06 13:09  douban_flask\douban_flask\static\assets\img\portfolio\portfolio-5.jpg

     文件      25598  2020-02-06 13:09  douban_flask\douban_flask\static\assets\img\portfolio\portfolio-6.jpg

     文件     122008  2020-02-06 13:09  douban_flask\douban_flask\static\assets\img\portfolio\portfolio-7.jpg

............此处省略128个文件信息

评论

共有 条评论