# CommentAnalysis
**Repository Path**: fenlinu/commentAs
## Basic Information
- **Project Name**: CommentAnalysis
- **Description**: 评论分析工具
- **Primary Language**: Python
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-09-07
- **Last Updated**: 2024-09-24
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# CommentAnalysis
## 介绍
评论分析工具
## 软件架构
软件架构说明
## 详细说明
### app分为以下几类:
登录注册的app,
数据可视化的app,
爬取抖音评论的app,
爬取哔哩哔哩评论的app,
各种中间件的处理的app.
其中数据可视化app中包括的功能为:
返回当前爬取任务数据,返回所有爬取到的数据,提供各种的评论查询接口等,
页面上所有需要展示的数据的接口。
爬取数据的app包括功能为创建特定的爬取任务,执行爬取数据的任务,提供查询爬取任务
的接口以及最后将爬取的数据存入到数据库的功能。
### 文件大致结构
```text
commentAs
|---|statics
|---|program
|---|apps
|------|users
|------|middleware
|------|login
|------|visual
|------|douyin
|------|bilibili
|---------|urls.py
|---------|models.py
|---------|dataTemplate.py
|----|settings.py
|----|main.py
```
## 安装教程
1. pip install fastapi
2. pip install uvicorn
3. pip install pydantic
4. pip install python-multipart
5. pip install tortoise-orm
6. pip install aerich
7. pip install fastapi-sessions
8. pip install requests
9. pip install cryptography
## 使用说明
### 项目启动
1. 启动项目运行main.py
2. xxxx
3. xxxx
### 数据库配置
1. 初始化配置,只需要使用一次
aerich init -t settings.TORTOISE_ORM # TORTOISE_ORM配置的位置)
初始化完会在当前目录生成一个文件:pyproject.toml和一个文件夹:migrations
● pyproject.toml:保存配置文件路径,低版本可能是aerich.ini
● migrations:存放迁移文件
2. 初始化数据库,一般情况下只用一次
aerich init-db
此时数据库中就有相应的表格
如果TORTOISE_ORM配置文件中的models改了名,则执行这条命令时需要增加--app参数,来指定你修改的名字
## 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request