计算机毕业设计Python+Flask弹幕情感分析 B站视频数据可视化 B站爬虫 机器学习 深度学习 人工智能 NLP文本分类 数据可视化 大数据毕业设计

首先安装需要的python库,
安装完之后利用navicat导入数据库文件bili100.sql到mysql中,
再在pycharm编译器中连接mysql数据库,并在设置文件中将密码修改成你的数据库密码。最后运行app.py,打开链接,即可运行。


B站爬虫数据分析可视化项目
python爬虫数据分析可视化项目
哔哩哔哩bilibiliTOP100数据并可视化


Python爬取哔哩哔哩各分区TOP100排行榜数据,保存到MySQL数据库中,利用PyEcharts库进行可视化。
可视化图表包括:各分区占比饼图、各分区总播放数漏斗图、综合排名标题词云图、各分区点赞投币收藏情况、各分区弹幕评论转发情况和综合收藏投币点赞情况。


核心算法代码分享如下:

python 复制代码
import time
import pymysql

class dbUtil():
    def __init__(self):
        conn, cursor = self.get_conn()
        self.conn = conn
        self.cursor = cursor

    def get_time(self):
        time_str = time.strftime("%Y{}%m{}%d{} %X")
        return time_str.format("年", "月", "日")

    def get_conn(self):
        # 建立连接
        conn = pymysql.connect(host="127.0.0.1", user="root", password="123456", db="bili100", charset="utf8")
        # c创建游标A
        cursor = conn.cursor()
        return conn, cursor

    def close_commit(self):
        self.conn.commit()
        if self.cursor:
            self.cursor.close()
        if self.conn:
            self.conn.close()

    def close(self):
        self.conn.commit()
        if self.cursor:
            self.cursor.close()
        if self.conn:
            self.conn.close()

    def query(self, sql, *args):
        self.cursor.execute(sql, args)
        res = self.cursor.fetchall()
        return res

    def query_noargs(self, sql):
        self.cursor.execute(sql)
        res = self.cursor.fetchall()
        return res
相关推荐
AAA小肥杨3 小时前
基于k8s的Python的分布式深度学习训练平台搭建简单实践
人工智能·分布式·python·ai·kubernetes·gpu
lichong9514 小时前
Git 检出到HEAD 再修改提交commit 会消失解决方案
java·前端·git·python·github·大前端·大前端++
Tiny番茄4 小时前
31.下一个排列
数据结构·python·算法·leetcode
小白学大数据5 小时前
实战:Python爬虫如何模拟登录与维持会话状态
开发语言·爬虫·python
FriendshipT6 小时前
目标检测:使用自己的数据集微调DEIMv2进行物体检测
人工智能·pytorch·python·目标检测·计算机视觉
平谷一勺6 小时前
数据清洗-缺失值的处理
python·数据分析
末世灯光6 小时前
时间序列入门第一问:它和普通数据有什么不一样?(附 3 类典型案例)
人工智能·python·机器学习·时序数据
开心-开心急了6 小时前
Flask入门教程——李辉 第一、二章关键知识梳理(更新一次)
后端·python·flask
锦***林6 小时前
用 Python 写一个自动化办公小助手
开发语言·python·自动化
IT小哥哥呀6 小时前
电池制造行业数字化实施
大数据·制造·智能制造·数字化·mom·电池·信息化