modify scripts
This commit is contained in:
20
requirements.txt
Normal file
20
requirements.txt
Normal 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
|
||||
Reference in New Issue
Block a user