mirror of
https://github.com/fish2018/pansou.git
synced 2025-11-25 03:14:59 +08:00
update
This commit is contained in:
@@ -125,13 +125,6 @@ func (p *ClmaoPlugin) searchImpl(client *http.Client, keyword string, ext map[st
|
||||
return nil, fmt.Errorf("[%s] 读取响应失败: %w", p.Name(), err)
|
||||
}
|
||||
|
||||
// 调试输出前500个字符
|
||||
if len(body) > 500 {
|
||||
fmt.Printf("[%s] 响应内容前500字符: %s\n", p.Name(), string(body[:500]))
|
||||
} else {
|
||||
fmt.Printf("[%s] 完整响应内容: %s\n", p.Name(), string(body))
|
||||
}
|
||||
|
||||
// 解析HTML
|
||||
doc, err := goquery.NewDocumentFromReader(strings.NewReader(string(body)))
|
||||
if err != nil {
|
||||
@@ -170,7 +163,7 @@ func (p *ClmaoPlugin) extractSearchResults(doc *goquery.Document) []model.Search
|
||||
// parseSearchResult 解析单个搜索结果
|
||||
func (p *ClmaoPlugin) parseSearchResult(s *goquery.Selection) model.SearchResult {
|
||||
result := model.SearchResult{
|
||||
Channel: p.Name(),
|
||||
Channel: "", // 插件搜索结果必须为空字符串
|
||||
Datetime: time.Now(),
|
||||
}
|
||||
|
||||
@@ -193,7 +186,7 @@ func (p *ClmaoPlugin) parseSearchResult(s *goquery.Selection) model.SearchResult
|
||||
p.extractFileList(s, &result)
|
||||
|
||||
// 生成唯一ID
|
||||
result.UniqueID = fmt.Sprintf("%s_%d", p.Name(), time.Now().UnixNano())
|
||||
result.UniqueID = fmt.Sprintf("%s-%d", p.Name(), time.Now().UnixNano())
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ func (p *PanyqPlugin) doSearch(client *http.Client, keyword string, ext map[stri
|
||||
// 步骤3: 执行中间状态确认
|
||||
err := p.performIntermediateStep(actionIDs[ActionIDKeys[1]], credentials.Hash, credentials.Sha, item.EID, client)
|
||||
if err != nil {
|
||||
fmt.Println("panyq: intermediate step failed for", item.EID, ":", err)
|
||||
// fmt.Println("panyq: intermediate step failed for", item.EID, ":", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ func (p *WujiPlugin) extractSearchResults(doc *goquery.Document) []model.SearchR
|
||||
// parseSearchResult 解析单个搜索结果
|
||||
func (p *WujiPlugin) parseSearchResult(s *goquery.Selection) model.SearchResult {
|
||||
result := model.SearchResult{
|
||||
Channel: p.Name(),
|
||||
Channel: "", // 插件搜索结果必须为空字符串
|
||||
Datetime: time.Now(),
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ func (p *WujiPlugin) parseSearchResult(s *goquery.Selection) model.SearchResult
|
||||
}}
|
||||
|
||||
// 生成唯一ID
|
||||
result.UniqueID = fmt.Sprintf("%s_%d", p.Name(), time.Now().UnixNano())
|
||||
result.UniqueID = fmt.Sprintf("%s-%d", p.Name(), time.Now().UnixNano())
|
||||
|
||||
// 添加标签
|
||||
result.Tags = []string{"magnet"}
|
||||
|
||||
Reference in New Issue
Block a user