plugin/xdyh/json结构分析.md
https://ys.66ds.de/searchPOSTapplication/json{
"keyword": "关键词",
"sites": null,
"max_workers": 10,
"save_to_file": false,
"split_links": true
}
| 参数名 | 类型 | 必需 | 默认值 | 说明 |
|---|---|---|---|---|
keyword | string | 是 | - | 搜索关键词 |
sites | array/null | 否 | null | 指定搜索的站点列表,null表示搜索所有站点 |
max_workers | int | 否 | 10 | 最大并发工作线程数 |
save_to_file | bool | 否 | false | 是否保存结果到文件 |
split_links | bool | 否 | true | 是否拆分链接 |
{
"status": "success",
"keyword": "搜索关键词",
"search_timestamp": "2025-09-09T09:55:55.091056",
"summary": { ... },
"successful_sites": [ ... ],
"failed_sites": [ ... ],
"data": [ ... ],
"performance": { ... }
}
| 字段名 | 类型 | 说明 |
|---|---|---|
status | string | 请求状态:"success" 或 "error" |
keyword | string | 搜索关键词 |
search_timestamp | string | 搜索时间戳(ISO 8601格式) |
{
"total_sites_searched": 9,
"successful_sites": 9,
"failed_sites": 0,
"total_search_results": 759,
"total_successful_parses": 232,
"total_drive_links": 226,
"unique_links": 226
}
| 字段名 | 类型 | 说明 |
|---|---|---|
total_sites_searched | int | 总搜索站点数 |
successful_sites | int | 成功搜索的站点数 |
failed_sites | int | 失败的站点数 |
total_search_results | int | 总搜索结果数 |
total_successful_parses | int | 成功解析的结果数 |
total_drive_links | int | 网盘链接总数 |
unique_links | int | 去重后的唯一链接数 |
{
"successful_sites": [
"云桥",
"寻道云海",
"易客FM",
"段聚搜",
"搜一搜影视",
"闪电搜",
"Melost",
"万阅书屋",
"Pansoo夸克网盘"
],
"failed_sites": []
}
{
"title": "逆仙而上[2025]【更至14】[爱情 古装]",
"post_date": "2025-09-08 12:32:03",
"drive_links": [
"https://pan.quark.cn/s/de411fee612b"
],
"has_links": true,
"link_count": 1,
"password": "",
"source_api": "yunso",
"source_site": "云桥"
}
{
"title": "仙逆",
"post_date": "2025-09-07",
"drive_links": [
"https://pan.quark.cn/s/85ef7d3e06b5"
],
"password": "7vs2",
"has_password": true,
"has_links": true,
"link_count": 1,
"source_site": "万阅书屋",
"file_preview": "file:仙逆-hu-077.mp4, file:仙逆-hu-091.mp4"
}
| 字段名 | 类型 | 必需 | 说明 |
|---|---|---|---|
title | string | 是 | 资源标题 |
post_date | string | 是 | 发布日期(格式:YYYY-MM-DD HH:mm:ss 或 YYYY-MM-DD) |
drive_links | array | 是 | 网盘链接列表 |
has_links | bool | 是 | 是否包含有效链接 |
link_count | int | 是 | 链接数量 |
password | string | 否 | 网盘密码(可能为空) |
has_password | bool | 否 | 是否有密码 |
source_site | string | 是 | 来源站点名称 |
source_api | string | 否 | 来源API标识 |
file_preview | string | 否 | 文件预览信息(部分结果) |
{
"total_search_time": 1.67,
"sites_searched": 9,
"avg_time_per_site": 0.19,
"optimization": "asyncio_gather",
"timestamp": "2025-09-09T09:55:55.091451"
}
| 字段名 | 类型 | 说明 |
|---|---|---|
total_search_time | float | 总搜索耗时(秒) |
sites_searched | int | 搜索的站点数量 |
avg_time_per_site | float | 平均每站点耗时(秒) |
optimization | string | 优化策略标识 |
timestamp | string | 性能统计时间戳 |
根据API返回的数据分析,支持以下网盘类型:
https://pan.quark.cn/s/xxxxxxxxhttps://drive.uc.cn/s/xxxxxxxxhttps://pan.baidu.com/s/xxxxxxxxhttps://www.alipan.com/s/xxxxxxxxhttps://cloud.189.cn/t/xxxxxxxxAPI聚合了以下9个搜索站点:
yunsoasyncio_gather 优化策略max_workers)has_password 字段标识password 字段中type SearchRequest struct {
Keyword string `json:"keyword"`
Sites interface{} `json:"sites"` // null or []string
MaxWorkers int `json:"max_workers"`
SaveToFile bool `json:"save_to_file"`
SplitLinks bool `json:"split_links"`
}
type APIResponse struct {
Status string `json:"status"`
Keyword string `json:"keyword"`
SearchTimestamp string `json:"search_timestamp"`
Summary Summary `json:"summary"`
SuccessfulSites []string `json:"successful_sites"`
FailedSites []string `json:"failed_sites"`
Data []SearchResultItem `json:"data"`
Performance Performance `json:"performance"`
}
type SearchResultItem struct {
Title string `json:"title"`
PostDate string `json:"post_date"`
DriveLinks []string `json:"drive_links"`
HasLinks bool `json:"has_links"`
LinkCount int `json:"link_count"`
Password string `json:"password,omitempty"`
HasPassword bool `json:"has_password,omitempty"`
SourceSite string `json:"source_site"`
SourceAPI string `json:"source_api,omitempty"`
FilePreview string `json:"file_preview,omitempty"`
}
// 将API结果转换为标准链接格式
func convertToStandardLinks(items []SearchResultItem) []model.Link {
var links []model.Link
for _, item := range items {
for _, driveLink := range item.DriveLinks {
link := model.Link{
Type: determineCloudType(driveLink),
URL: driveLink,
Password: item.Password,
}
links = append(links, link)
}
}
return links
}
max_workers 参数