计算机毕业设计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
相关推荐
Hello_Pyhx5 分钟前
Deep-Live-Cam 源码配置思路:环境、模型与执行后端分开排查
python
SelectDB7 分钟前
Doris 异步物化视图实战:与 Snowflake MV / Dynamic Tables 分层建模对照
大数据·数据库·云原生
张张123y31 分钟前
后端第十六课:Multi-Agent 多智能体(让多个 Agent 分工协作)
大数据·数据库·人工智能·python·deepseek·dsh·agent 框架
全栈练习生1 小时前
大规模智能体仿真
python·ai
I Am a robert girl1 小时前
推理时刻的精确性:当模型开始“证明“而不是“拟合“
神经网络·机器学习·ai论文·泛化能力·生成机制·分布外泛化·模型表示
todoitbo1 小时前
MongoDB迁移之后,Spring Data 和 Hibernate 各自接哪类请求
大数据·数据库·mongodb·spring·hibernate·金仓数据库
code2cat1 小时前
【随笔】vLLM前缀缓存:相同的开头怎样少算一次
人工智能·python·缓存·vllm
陈飞EXCEL1 小时前
北京杰飞 IT 旗下妙码生花少儿Python编程上线两大学习系统
开发语言·python·学习
大大大大晴天️2 小时前
从 Prompt 到 Tool Calling:AI Agent 如何稳定连接程序世界
大数据·ai-agent
Anesthesia丶2 小时前
基于 Qwen3-TTS 的多语言智能配音 Web 应用(Qwen3 TTS Studio)
python·ai·qwen-tts·agci