# 项目名称
bili_scrapy
## 简介
一个可视化的抓取b站弹幕和评论的爬虫项目~
## 运行环境
python3.10
## 安装依赖
```bash
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
```
## 配置数据库信息
将`settings.py`中的数据库配置修改为你自己的即可。
## 创建数据库表
```bash
py./manage.py makemigrations
py./manage.py migrate
```
## 初始化数据库
```bash
py ./manage.py makemigrations
py ./manage.py migrate
```
## 启动项目
```bash
py ./manage.py runserver
```
访问本地[```地址```](http://127.0.0.1:8000/bilibili/danmaku.html)
## 演示效果
![img.png](img/img.png)
### 弹幕结果图
![img.png](img/img2.png)
### 评论结果图
![img.png](img/img3.png)
### 汇总结果图
![img.png](img/img4.png)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
爬虫(Web Crawler)是一种自动化程序,用于从互联网上收集信息。其主要功能是访问网页、提取数据并存储,以便后续分析或展示。爬虫通常由搜索引擎、数据挖掘工具、监测系统等应用于网络数据抓取的场景。 爬虫的工作流程包括以下几个关键步骤: URL收集: 爬虫从一个或多个初始URL开始,递归或迭代地发现新的URL,构建一个URL队列。这些URL可以通过链接分析、站点地图、搜索引擎等方式获取。 请求网页: 爬虫使用HTTP或其他协议向目标URL发起请求,获取网页的HTML内容。这通常通过HTTP请求库实现,如Python中的Requests库。 解析内容: 爬虫对获取的HTML进行解析,提取有用的信息。常用的解析工具有正则表达式、XPath、Beautiful Soup等。这些工具帮助爬虫定位和提取目标数据,如文本、图片、链接等。 数据存储: 爬虫将提取的数据存储到数据库、文件或其他存储介质中,以备后续分析或展示。常用的存储形式包括关系型数据库、NoSQL数据库、JSON文件等。 遵守规则: 为避免对网站造成过大负担或触发反爬虫机制,爬虫需要遵守网站的robots.txt协议,限制访问频率和深度,并模拟人类访问行为,如设置User-Agent。 反爬虫应对: 由于爬虫的存在,一些网站采取了反爬虫措施,如验证码、IP封锁等。爬虫工程师需要设计相应的策略来应对这些挑战。 爬虫在各个领域都有广泛的应用,包括搜索引擎索引、数据挖掘、价格监测、新闻聚合等。然而,使用爬虫需要遵守法律和伦理规范,尊重网站的使用政策,并确保对被访问网站的服务器负责。
资源推荐
资源详情
资源评论
收起资源包目录
一个可视化的抓取b站弹幕和评论的爬虫项目~.zip (133个子文件)
bootstrap.css 191KB
bootstrap.rtl.css 191KB
bootstrap.rtl.min.css 152KB
bootstrap.min.css 152KB
bootstrap-grid.rtl.css 69KB
bootstrap-grid.css 69KB
bootstrap-utilities.css 67KB
bootstrap-utilities.rtl.css 67KB
bootstrap-grid.rtl.min.css 50KB
bootstrap-grid.min.css 50KB
bootstrap-utilities.min.css 50KB
bootstrap-utilities.rtl.min.css 50KB
bootstrap-reboot.css 6KB
bootstrap-reboot.rtl.css 6KB
bootstrap-reboot.rtl.min.css 5KB
bootstrap-reboot.min.css 5KB
chromedriver.exe 16.21MB
.gitignore 163B
generate_chart.html 7KB
danmaku.html 6KB
comment.html 6KB
download_video.html 4KB
base.html 4KB
pagination.html 4KB
enter_card.html 726B
motaikuang.html 495B
analysis.html 71B
favicon.ico 23KB
touxiang.jpg 23KB
bootstrap.bundle.js 203KB
bootstrap.js 145KB
bootstrap.esm.js 136KB
bootstrap.bundle.min.js 77KB
bootstrap.esm.min.js 71KB
bootstrap.min.js 59KB
utils.js 860B
246664577_448-20_10944.json 3.56MB
574966027_290-20_6250.json 1.27MB
1344096153_unique_danmaku.json 1013KB
875693196_188-20_4160.json 982KB
1350353746_unique_danmaku.json 525KB
297429289_unique_danmaku.json 398KB
1342692382_unique_danmaku.json 314KB
1366382835_unique_danmaku.json 281KB
1320122396_unique_danmaku.json 256KB
1310133943_unique_danmaku.json 251KB
1312461374_unique_danmaku.json 249KB
1329596119_unique_danmaku.json 217KB
1364379961_unique_danmaku.json 196KB
1365212794_unique_danmaku.json 191KB
1348461557_unique_danmaku.json 175KB
1365564272_unique_danmaku.json 161KB
930139350_30-20_656.json 149KB
705620387_12-20_294.json 63KB
1366752555_unique_danmaku.json 57KB
1350384479_unique_danmaku.json 52KB
1357946891_unique_danmaku.json 40KB
236247979_6-20_123.json 26KB
1342553600_unique_danmaku.json 23KB
1364397732_unique_danmaku.json 10KB
1366435757_unique_danmaku.json 829B
1365758679_unique_danmaku.json 274B
bilibili_cookies.json 3B
1326051241_unique_danmaku.json 2B
None_unique_danmaku.json 2B
173760921_unique_danmaku.json 2B
LICENSE 11KB
all-2023-12-14.log 215KB
info-2023-12-14.log 97KB
all-2023-12-15.log 53KB
info-2023-12-15.log 45KB
error-2023-12-15.log 3KB
error-2023-12-14.log 2KB
bootstrap.rtl.min.css.map 620KB
bootstrap.css.map 502KB
bootstrap.rtl.css.map 502KB
bootstrap.min.css.map 421KB
bootstrap.bundle.js.map 415KB
bootstrap.bundle.min.js.map 318KB
bootstrap.js.map 284KB
bootstrap.esm.js.map 282KB
bootstrap.esm.min.js.map 217KB
bootstrap.min.js.map 212KB
bootstrap-grid.rtl.css.map 186KB
bootstrap-grid.css.map 186KB
bootstrap-utilities.css.map 179KB
bootstrap-utilities.rtl.css.map 179KB
bootstrap-grid.rtl.min.css.map 113KB
bootstrap-grid.min.css.map 113KB
bootstrap-utilities.min.css.map 105KB
bootstrap-utilities.rtl.min.css.map 105KB
bootstrap-reboot.rtl.css.map 98KB
bootstrap-reboot.css.map 98KB
bootstrap-reboot.rtl.min.css.map 40KB
bootstrap-reboot.min.css.map 34KB
README.md 816B
img4.png 90KB
img3.png 61KB
img2.png 58KB
img.png 48KB
共 133 条
- 1
- 2
资源评论
JJJ69
- 粉丝: 6115
- 资源: 5674
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- ZEND解密dezender12
- sony 索尼IMX334摄像头模组电路板AD版硬件PCB图(6层板).zip
- 基于flask和echarts融合交易策略的bitfinex可视化微服务.zip
- 包含了wvp-assist.tar wvp-talk.tar zlmediakit.tar .
- 3r4efgh53wgrf43tw
- 2024新版Java基础从入门到精通全套视频+资料下载
- Spring AI大模型视频教程+ChatGPT视频教程+OpenAI大模型视频教程(资料+视频教程)
- ABB工业机器人教程PDF版本
- 123321123323211
- 三相桥式全桥整流电路MATALB Simulink仿真文件
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功