38c11b05d5ed702f8a2b88cf9425cb565d8de5ad
1,密码哈希:
将密码加盐哈希的逻辑抽取到 hash_password 函数中,提高代码复用性。
2,参数化查询:
使用参数化的 SQL 查询防止 SQL 注入攻击。
3表单字段获取:
使用 get 方法获取表单字段,并移除多余空格。
4,友好错误提示:
登录失败时,返回错误信息,并保留用户名以减少用户重新输入的负担。
Weibo Public Opinion Analysis System
This project is a Social Network Public Opinion Analysis System designed for monitoring, analyzing, and predicting public opinion trends using data from social media platforms such as Weibo.
Keywords: Deep Learning, Web Scraping, Full-Stack Development, Natural Language Processing (NLP), Transformers, Flask, Sentiment Analysis, Topic Classification, Data Visualization, Real-time Monitoring, Machine Learning
Features
- Real-time Data Collection: Scrapes and processes data from social platforms.
- Data Cleaning & Processing: Cleans and processes collected data for analysis.
- Topic Classification: Categorizes posts and comments into relevant topics using machine learning.
- Sentiment Analysis: Detects emotional tone (positive, neutral, or negative) in text.
- Trend Prediction: Predicts future trends in public opinion based on historical data.
Installation & Setup
-
Install the necessary environment dependencies (optional):
conda install --file requirements.txt -
Configure your MySQL database:
- Run
createTables.sqlto set up the required tables. - Modify the MySQL configuration in the program accordingly.
- Run
-
Start the project with Flask:
python app.py
Description
Languages
Python
98.4%
Jupyter Notebook
1.3%
JavaScript
0.1%