Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
doudian-py
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiquan
doudian-py
Commits
cf19082a
Commit
cf19082a
authored
Jun 30, 2025
by
baiquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
使用uv进行包管理
parent
0663eb1f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
3 deletions
+67
-3
.python-version
+1
-0
README.md
+11
-3
pyproject.toml
+52
-0
service/page_login.py
+3
-0
No files found.
.python-version
0 → 100644
View file @
cf19082a
3.11
README.md
View file @
cf19082a
...
...
@@ -6,12 +6,20 @@
## 安装依赖
在运行项目之前,请确保已经安装了 Python、Redis 和 必要的依赖库。可以使用以下命令安装所需的依赖:
### 使用该命令创建虚拟环境
```
bash
pip install
-r
requirements.txt
uv venv
```
### 使用该命令安装依赖
```
bash
uv pip install
.
```
## 启动命令
### 激活虚拟环境
```
bash
.venv
\S
cripts
\a
ctivate
```
### 启动Celery Worker
```
bash
celery
-A
celery_app worker
-l
info
-P
gevent
...
...
@@ -19,7 +27,7 @@ celery -A celery_app worker -l info -P gevent
### 启动API服务
```
bash
uvicorn
api:app
--host
0.0.0.0
--port
9001
--reload
uvicorn api:app
--host
0.0.0.0
--port
9001
--reload
```
pyproject.toml
0 → 100644
View file @
cf19082a
[build-system]
requires
=
["setuptools>=64.0.0"]
build-backend
=
"setuptools.build_meta"
[project]
name
=
"doudian-py"
version
=
"0.1.0"
description
=
"Add your description here"
readme
=
"README.md"
requires-python
=
">=3.11"
[[tool.uv.index]]
url
=
"https://pypi.tuna.tsinghua.edu.cn/simple"
default
=
true
dependencies
=
[
"requests~=2.32.3"
,
"PyExecJS~=1.5.1"
,
"loguru~=0.7.3"
,
"celery~=5.5.0"
,
"fastapi~=0.115.11"
,
"pydantic~=2.10.6"
,
"curl_cffi~=0.10.0"
,
"DrissionPage~=4.1.0.18"
,
"dynaconf~=3.2.10"
,
"ddddocr~=1.5.6"
,
"playwright~=1.50.0"
,
"opencv-python~=4.11.0.86"
,
"tenacity~=9.1.2"
,
"tqdm~=4.67.1"
,
"gevent~=25.5.1"
,
"redis"
,
"uvicorn"
,
"pandas~=2.2.3"
,
"PyYAML~=6.0.2"
,
"PyMySQL~=1.1.1"
,
"mysql~=0.0.3"
,
"mysql-connector-python~=9.3.0"
,
"retrying~=1.4.0"
]
[tool.setuptools]
# 明确指定项目中的所有包
packages
=
[
"dao"
,
"js"
,
"logs"
,
"service"
,
"video"
]
# 指定包目录结构(根目录)
package-dir
=
{
""
=
"."
}
\ No newline at end of file
service/page_login.py
View file @
cf19082a
...
...
@@ -107,6 +107,8 @@ def listen_login(tab):
if
'account_login/v2/'
in
packet
.
url
:
login_res
=
packet
.
response
.
body
logger
.
info
(
f
'获取登录数据:{login_res}'
)
if
not
login_res
:
continue
if
login_res
[
'description'
]
==
'滑动滑块进行验证'
:
verify_captcha
(
tab
)
elif
login_res
[
'description'
]
==
''
:
...
...
@@ -114,6 +116,7 @@ def listen_login(tab):
break
else
:
raise
AppError
(
f
"登录失败 {login_res['description']}"
)
raise
AppError
(
"登录失败-->未获取到登录数据"
)
def
listen_check_login
(
tab
):
check_result
=
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment