modify scripts

This commit is contained in:
2025-11-10 15:22:45 +08:00
parent 28124c1bff
commit bd6e1b6ed8
4 changed files with 192 additions and 2 deletions

20
requirements.txt Normal file
View File

@ -0,0 +1,20 @@
# 公共包,一般情况下都有了
requests
beautifulsoup4
lxml
pymysql
cloudscraper
scrapy
sqlalchemy>=2.0.0
alembic>=1.12.0
sqlacodegen>=3.0.0
# nas 环境下直接pip安装 scrapy 会报错cryptography 与系统的有冲突。所以必须要在 虚拟环境下安装和运行
# apt update && apt install -y python3.12-venv # 安装 python3.12-venv ,版本对应于 python3 --version
# python3 -m venv ~/sharedata/pyenv # 创建虚拟环境
# source ~/sharedata/pyenv/bin/activate # 激活虚拟环境
# pip install -r requirements.txt # 安装所需要的包
# 每次运行前,都要先激活虚拟环境
# source ~/sharedata/pyenv/bin/activate
# export DB_ENV=nas && scrapy crawl u3c3 -a begin='2025-11-09' -a end='2025-11-10' -s STATS_PUSH_MSG=False