From 2b8133602f748c84cf775b1eb446e28e55715668 Mon Sep 17 00:00:00 2001 From: levywang Date: Thu, 13 Mar 2025 11:33:54 +0800 Subject: [PATCH] change readme --- README.md | 13 ++++++++++++- README_CN.md | 11 +++++++++++ main.py | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 905ac64..75f2752 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,17 @@ git clone https://github.com/levywang/avhub.git cd avhub docker run -d -p :80 -v $PWD:/app --name avhub levywang/avhub:latest ``` +--- + +### **Configuration Instructions** + +If you deploy the project on a server within China, the source site `missav` is blocked, so you need to configure a proxy server in `config.yaml`. Edit the `/data/config.yaml` file and modify it as follows: +```yaml +av_spider: + source_url: "https://missav.ai/cn/search/" + proxy_url: "http://192.168.50.3:7890" # HTTP or SOCKS5 proxy + use_proxy: true +``` --- @@ -82,7 +93,7 @@ docker run -d -p :80 -v $PWD:/app --name avhub levywang/avhub: ### **Data Sources** - **Magnet Links and Cover Images**: Sourced from **missav**. -- **Hentai Resources**: Sourced from **hacg liuli**. +- **Hacg Resources**: Sourced from **hacg liuli**. - **Random Video Recommendations**: Sourced from crawled data stored in the local file `/data/video_urls.txt`. The above data sources are configured in `/data/config.yaml`. If the data sources change or become inaccessible, modifications and maintenance are required. diff --git a/README_CN.md b/README_CN.md index eb270eb..7fcb3e8 100644 --- a/README_CN.md +++ b/README_CN.md @@ -68,6 +68,17 @@ git clone https://github.com/levywang/avhub.git cd avhub docker run -d -p :80 -v $PWD:/app --name avhub levywang/avhub:latest ``` +--- + +### 配置说明 + +如果您将项目部署在中国境内的服务器上,由于源站 `missav` 被屏蔽,需要在 `config.yaml` 中配置代理服务器。请编辑 `/data/config.yaml` 文件,修改示例如下: +```yaml +av_spider: + source_url: "https://missav.ai/cn/search/" + proxy_url: "http://192.168.50.3:7890" # HTTP 或 SOCKS5 代理 + use_proxy: true +``` --- diff --git a/main.py b/main.py index b1b0446..6d11537 100644 --- a/main.py +++ b/main.py @@ -120,7 +120,7 @@ def main(cfg: DictConfig): logger.info("Random video URL and image URL fetched successfully") return { "url": video_url, - "img_url": img_url or "" # 如果没有找到图片,使用默认图片 + "img_url": img_url or "" } except Exception as e: logger.error(f"Failed to fetch random video URL: {str(e)}")