change readme

This commit is contained in:
levywang 2025-03-13 11:33:54 +08:00
parent b759b57585
commit 2b8133602f
3 changed files with 24 additions and 2 deletions

View File

@ -66,6 +66,17 @@ git clone https://github.com/levywang/avhub.git
cd avhub
docker run -d -p <your_server_port>: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 <your_server_port>: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.

View File

@ -68,6 +68,17 @@ git clone https://github.com/levywang/avhub.git
cd avhub
docker run -d -p <your_server_port>: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
```
---

View File

@ -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)}")