diff --git a/Dockerfile b/Dockerfile index c14bc94..b760a88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,6 @@ RUN pip install --no-cache-dir -r /app/requirements.txt VOLUME /app -EXPOSE 8000 +EXPOSE 6666 CMD ["python", "main.py"] diff --git a/README.md b/README.md index 6e32748..acb2c8d 100644 --- a/README.md +++ b/README.md @@ -83,8 +83,8 @@
docker run --name 容器名称(可选) -p 主机端口号:8000 -it joeanamier/xhs-downloaderdocker run --name 容器名称(可选) -p 主机端口号:8000 -it joeanamier/xhs-downloader python main.py serverdocker run --name 容器名称(可选) -p 主机端口号:6666 -it joeanamier/xhs-downloaderdocker run --name 容器名称(可选) -p 主机端口号:6666 -it joeanamier/xhs-downloader python main.py server启动:运行命令:python .\main.py server
关闭:按下 Ctrl + C 关闭服务器
访问 http://127.0.0.1:8000/docs;你会看到自动生成的交互式 API 文档!
访问 http://127.0.0.1:6666/docs 或者 http://127.0.0.1:6666/redoc;你会看到自动生成的交互式 API 文档!
请求接口:/xhs/
请求方法:POST
请求格式:JSON
代码示例:
def api_demo():
- server = "http://127.0.0.1:8000/xhs/"
+ server = "http://127.0.0.1:6666/xhs/"
data = {
"url": "https://www.xiaohongshu.com/explore/123456789",
"download": True,
diff --git a/README_EN.md b/README_EN.md
index 8420fd8..a1c845d 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -84,8 +84,8 @@
docker run --name ContainerName(optional) -p HostPort:8000 -it joeanamier/xhs-downloaderdocker run --name ContainerName(optional) -p HostPort:8000 -it joeanamier/xhs-downloader python main.py serverdocker run --name ContainerName(optional) -p HostPort:6666 -it joeanamier/xhs-downloaderdocker run --name ContainerName(optional) -p HostPort:6666 -it joeanamier/xhs-downloader python main.py serverStart: Run the command: python .\main.py server
Stop: Press Ctrl + C to stop the server
Open http://127.0.0.1:8000/docs; you will see automatically generated interactive API documentation!
Open http://127.0.0.1:6666/docs or http://127.0.0.1:6666/redoc; you will see automatically generated interactive API documentation!
Request endpoint:
/xhs/
Request method: @@ -170,7 +170,7 @@
Code example:
def api_demo():
- server = "http://127.0.0.1:8000/xhs/"
+ server = "http://127.0.0.1:6666/xhs/"
data = {
"url": "https://www.xiaohongshu.com/explore/123456789",
"download": True,
diff --git a/main.py b/main.py
index 520d3bf..f254a51 100644
--- a/main.py
+++ b/main.py
@@ -16,7 +16,7 @@ async def app():
async def server(
host="0.0.0.0",
- port=8000,
+ port=6666,
log_level="info",
):
async with XHS(**Settings().run()) as xhs:
diff --git a/source/application/app.py b/source/application/app.py
index 5445744..6fccf17 100644
--- a/source/application/app.py
+++ b/source/application/app.py
@@ -475,7 +475,7 @@ class XHS:
async def run_server(
self,
host="0.0.0.0",
- port=8000,
+ port=6666,
log_level="info",
):
self.server = FastAPI(