mirror of
https://github.com/fish2018/pansou.git
synced 2025-11-25 03:14:59 +08:00
update
This commit is contained in:
@@ -28,9 +28,6 @@ var (
|
||||
tianyiLinkRegex = regexp.MustCompile(`https?://cloud\.189\.cn/t/[0-9a-zA-Z]+`)
|
||||
link115Regex = regexp.MustCompile(`https?://115\.com/s/[0-9a-zA-Z]+`)
|
||||
mobileLinkRegex = regexp.MustCompile(`https?://(caiyun\.feixin\.10086\.cn|caiyun\.139\.com|yun\.139\.com|cloud\.139\.com|pan\.139\.com)/.*`)
|
||||
weiyunLinkRegex = regexp.MustCompile(`https?://share\.weiyun\.com/[0-9a-zA-Z]+`)
|
||||
lanzouLinkRegex = regexp.MustCompile(`https?://(www\.)?(lanzou[uixys]*|lan[zs]o[ux])\.(com|net|org)/[0-9a-zA-Z]+`)
|
||||
jianguoyunLinkRegex = regexp.MustCompile(`https?://(www\.)?jianguoyun\.com/p/[0-9a-zA-Z]+`)
|
||||
link123Regex = regexp.MustCompile(`https?://123pan\.com/s/[0-9a-zA-Z]+`)
|
||||
pikpakLinkRegex = regexp.MustCompile(`https?://mypikpak\.com/s/[0-9a-zA-Z]+`)
|
||||
magnetLinkRegex = regexp.MustCompile(`magnet:\?xt=urn:btih:[0-9a-fA-F]{40}`)
|
||||
@@ -314,12 +311,6 @@ func (p *CygPlugin) determineCloudTypeByURL(url string) string {
|
||||
return "115"
|
||||
case mobileLinkRegex.MatchString(url):
|
||||
return "mobile"
|
||||
case weiyunLinkRegex.MatchString(url):
|
||||
return "weiyun"
|
||||
case lanzouLinkRegex.MatchString(url):
|
||||
return "lanzou"
|
||||
case jianguoyunLinkRegex.MatchString(url):
|
||||
return "jianguoyun"
|
||||
case link123Regex.MatchString(url):
|
||||
return "123"
|
||||
case pikpakLinkRegex.MatchString(url):
|
||||
@@ -352,12 +343,6 @@ func (p *CygPlugin) determineCloudType(name string) string {
|
||||
return "115"
|
||||
case "移动云盘", "移动", "mobile", "和彩云", "139云盘", "139", "中国移动云盘":
|
||||
return "mobile"
|
||||
case "微云", "腾讯微云", "weiyun":
|
||||
return "weiyun"
|
||||
case "蓝奏云", "蓝奏", "lanzou":
|
||||
return "lanzou"
|
||||
case "坚果云", "jianguoyun":
|
||||
return "jianguoyun"
|
||||
case "123网盘", "123pan", "123":
|
||||
return "123"
|
||||
case "pikpak", "pikpak网盘":
|
||||
|
||||
@@ -51,9 +51,6 @@ var (
|
||||
tianyiLinkRegex = regexp.MustCompile(`https?://cloud\.189\.cn/t/[0-9a-zA-Z]+`)
|
||||
link115Regex = regexp.MustCompile(`https?://115\.com/s/[0-9a-zA-Z]+`)
|
||||
mobileLinkRegex = regexp.MustCompile(`https?://caiyun\.feixin\.10086\.cn/[0-9a-zA-Z]+`)
|
||||
weiyunLinkRegex = regexp.MustCompile(`https?://share\.weiyun\.com/[0-9a-zA-Z]+`)
|
||||
lanzouLinkRegex = regexp.MustCompile(`https?://(www\.)?(lanzou[uixys]*|lan[zs]o[ux])\.(com|net|org)/[0-9a-zA-Z]+`)
|
||||
jianguoyunLinkRegex = regexp.MustCompile(`https?://(www\.)?jianguoyun\.com/p/[0-9a-zA-Z]+`)
|
||||
link123Regex = regexp.MustCompile(`https?://123pan\.com/s/[0-9a-zA-Z]+`)
|
||||
pikpakLinkRegex = regexp.MustCompile(`https?://mypikpak\.com/s/[0-9a-zA-Z]+`)
|
||||
magnetLinkRegex = regexp.MustCompile(`magnet:\?xt=urn:btih:[0-9a-fA-F]{40}`)
|
||||
@@ -342,18 +339,6 @@ func (p *ErxiaoAsyncPlugin) determineLinkTypeOptimized(apiType, url string) stri
|
||||
if mobileLinkRegex.MatchString(url) {
|
||||
return "mobile"
|
||||
}
|
||||
case "WY":
|
||||
if weiyunLinkRegex.MatchString(url) {
|
||||
return "weiyun"
|
||||
}
|
||||
case "LZ":
|
||||
if lanzouLinkRegex.MatchString(url) {
|
||||
return "lanzou"
|
||||
}
|
||||
case "JGY":
|
||||
if jianguoyunLinkRegex.MatchString(url) {
|
||||
return "jianguoyun"
|
||||
}
|
||||
case "123":
|
||||
if link123Regex.MatchString(url) {
|
||||
return "123"
|
||||
@@ -380,12 +365,6 @@ func (p *ErxiaoAsyncPlugin) determineLinkTypeOptimized(apiType, url string) stri
|
||||
return "115"
|
||||
case mobileLinkRegex.MatchString(url):
|
||||
return "mobile"
|
||||
case weiyunLinkRegex.MatchString(url):
|
||||
return "weiyun"
|
||||
case lanzouLinkRegex.MatchString(url):
|
||||
return "lanzou"
|
||||
case jianguoyunLinkRegex.MatchString(url):
|
||||
return "jianguoyun"
|
||||
case link123Regex.MatchString(url):
|
||||
return "123"
|
||||
case pikpakLinkRegex.MatchString(url):
|
||||
@@ -395,13 +374,13 @@ func (p *ErxiaoAsyncPlugin) determineLinkTypeOptimized(apiType, url string) stri
|
||||
case ed2kLinkRegex.MatchString(url):
|
||||
return "ed2k"
|
||||
case quarkLinkRegex.MatchString(url):
|
||||
return "quark" // quark放到最后,因为已排除
|
||||
return "quark"
|
||||
default:
|
||||
return "" // 不支持的类型
|
||||
}
|
||||
}
|
||||
|
||||
// determineLinkType 根据URL确定链接类型(支持16种类型)
|
||||
// determineLinkType 根据URL确定链接类型
|
||||
func (p *ErxiaoAsyncPlugin) determineLinkType(url string) string {
|
||||
switch {
|
||||
case quarkLinkRegex.MatchString(url):
|
||||
@@ -420,12 +399,6 @@ func (p *ErxiaoAsyncPlugin) determineLinkType(url string) string {
|
||||
return "115"
|
||||
case mobileLinkRegex.MatchString(url):
|
||||
return "mobile"
|
||||
case weiyunLinkRegex.MatchString(url):
|
||||
return "weiyun"
|
||||
case lanzouLinkRegex.MatchString(url):
|
||||
return "lanzou"
|
||||
case jianguoyunLinkRegex.MatchString(url):
|
||||
return "jianguoyun"
|
||||
case link123Regex.MatchString(url):
|
||||
return "123"
|
||||
case pikpakLinkRegex.MatchString(url):
|
||||
|
||||
@@ -177,18 +177,10 @@ func (p *JikepanAsyncV2Plugin) convertLinkType(service string) string {
|
||||
return "115"
|
||||
case "123":
|
||||
return "123"
|
||||
case "weiyun":
|
||||
return "weiyun"
|
||||
case "pikpak":
|
||||
return "pikpak"
|
||||
case "lanzou":
|
||||
return "lanzou"
|
||||
case "jianguoyun":
|
||||
return "jianguoyun"
|
||||
case "caiyun":
|
||||
return "mobile"
|
||||
case "chengtong":
|
||||
return "chengtong"
|
||||
case "ed2k":
|
||||
return "ed2k"
|
||||
case "magnet":
|
||||
|
||||
@@ -51,9 +51,6 @@ var (
|
||||
tianyiLinkRegex = regexp.MustCompile(`https?://cloud\.189\.cn/t/[0-9a-zA-Z]+`)
|
||||
link115Regex = regexp.MustCompile(`https?://115\.com/s/[0-9a-zA-Z]+`)
|
||||
mobileLinkRegex = regexp.MustCompile(`https?://caiyun\.feixin\.10086\.cn/[0-9a-zA-Z]+`)
|
||||
weiyunLinkRegex = regexp.MustCompile(`https?://share\.weiyun\.com/[0-9a-zA-Z]+`)
|
||||
lanzouLinkRegex = regexp.MustCompile(`https?://(www\.)?(lanzou[uixys]*|lan[zs]o[ux])\.(com|net|org)/[0-9a-zA-Z]+`)
|
||||
jianguoyunLinkRegex = regexp.MustCompile(`https?://(www\.)?jianguoyun\.com/p/[0-9a-zA-Z]+`)
|
||||
link123Regex = regexp.MustCompile(`https?://123pan\.com/s/[0-9a-zA-Z]+`)
|
||||
pikpakLinkRegex = regexp.MustCompile(`https?://mypikpak\.com/s/[0-9a-zA-Z]+`)
|
||||
magnetLinkRegex = regexp.MustCompile(`magnet:\?xt=urn:btih:[0-9a-fA-F]{40}`)
|
||||
@@ -317,12 +314,6 @@ func (p *OugeAsyncPlugin) mapCloudType(apiType, url string) string {
|
||||
return "115"
|
||||
case "MB":
|
||||
return "mobile"
|
||||
case "WY":
|
||||
return "weiyun"
|
||||
case "LZ":
|
||||
return "lanzou"
|
||||
case "JGY":
|
||||
return "jianguoyun"
|
||||
case "123":
|
||||
return "123"
|
||||
case "PK":
|
||||
@@ -352,9 +343,6 @@ func (p *OugeAsyncPlugin) isValidNetworkDriveURL(url string) bool {
|
||||
tianyiLinkRegex.MatchString(url) ||
|
||||
link115Regex.MatchString(url) ||
|
||||
mobileLinkRegex.MatchString(url) ||
|
||||
weiyunLinkRegex.MatchString(url) ||
|
||||
lanzouLinkRegex.MatchString(url) ||
|
||||
jianguoyunLinkRegex.MatchString(url) ||
|
||||
link123Regex.MatchString(url) ||
|
||||
pikpakLinkRegex.MatchString(url) ||
|
||||
magnetLinkRegex.MatchString(url) ||
|
||||
@@ -380,12 +368,6 @@ func (p *OugeAsyncPlugin) determineLinkType(url string) string {
|
||||
return "115"
|
||||
case mobileLinkRegex.MatchString(url):
|
||||
return "mobile"
|
||||
case weiyunLinkRegex.MatchString(url):
|
||||
return "weiyun"
|
||||
case lanzouLinkRegex.MatchString(url):
|
||||
return "lanzou"
|
||||
case jianguoyunLinkRegex.MatchString(url):
|
||||
return "jianguoyun"
|
||||
case link123Regex.MatchString(url):
|
||||
return "123"
|
||||
case pikpakLinkRegex.MatchString(url):
|
||||
|
||||
@@ -321,10 +321,6 @@ func extractLinks(content string) []model.Link {
|
||||
baiduLinks := extractLinksByPattern(content, "链接: https://pan.baidu.com", "提取码:", "baidu")
|
||||
allLinks = append(allLinks, baiduLinks...)
|
||||
|
||||
// 提取蓝奏云链接
|
||||
lanzouLinks := extractLinksByPattern(content, "https://[a-zA-Z0-9-]+.lanzou", "密码:", "lanzou")
|
||||
allLinks = append(allLinks, lanzouLinks...)
|
||||
|
||||
// 提取阿里云盘链接
|
||||
aliyunLinks := extractLinksByPattern(content, "https://www.aliyundrive.com/s/", "提取码:", "aliyun")
|
||||
allLinks = append(allLinks, aliyunLinks...)
|
||||
@@ -515,21 +511,6 @@ func extractLinksFromText(content string) []model.Link {
|
||||
}
|
||||
}
|
||||
|
||||
// 检查蓝奏云
|
||||
if strings.Contains(line, "lanzou") {
|
||||
url := extractURLFromText(line)
|
||||
if url != "" {
|
||||
linkInfos = append(linkInfos, struct {
|
||||
link model.Link
|
||||
position int
|
||||
category string
|
||||
}{
|
||||
link: model.Link{URL: url, Type: "lanzou"},
|
||||
position: i,
|
||||
category: "lanzou",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 检查天翼云盘
|
||||
if strings.Contains(line, "cloud.189.cn") {
|
||||
@@ -597,8 +578,6 @@ func extractLinksFromText(content string) []model.Link {
|
||||
match = true
|
||||
} else if linkInfos[i].category == "aliyun" && (pwInfo.keyword == "提取码" || pwInfo.keyword == "密码") {
|
||||
match = true
|
||||
} else if linkInfos[i].category == "lanzou" && pwInfo.keyword == "密码" {
|
||||
match = true
|
||||
} else if linkInfos[i].category == "tianyi" && (pwInfo.keyword == "访问码" || pwInfo.keyword == "密码") {
|
||||
match = true
|
||||
}
|
||||
|
||||
@@ -496,12 +496,6 @@ func (p *SusuAsyncPlugin) determineLinkType(url, name string) string {
|
||||
linkType = "uc"
|
||||
case strings.Contains(lowerURL, "caiyun.139.com"):
|
||||
linkType = "mobile"
|
||||
case strings.Contains(lowerURL, "share.weiyun.com"):
|
||||
linkType = "weiyun"
|
||||
case strings.Contains(lowerURL, "lanzou"):
|
||||
linkType = "lanzou"
|
||||
case strings.Contains(lowerURL, "jianguoyun.com"):
|
||||
linkType = "jianguoyun"
|
||||
case strings.Contains(lowerURL, "123pan.com"):
|
||||
linkType = "123"
|
||||
case strings.Contains(lowerURL, "mypikpak.com"):
|
||||
@@ -525,12 +519,6 @@ func (p *SusuAsyncPlugin) determineLinkType(url, name string) string {
|
||||
linkType = "uc"
|
||||
case strings.Contains(lowerName, "移动") || strings.Contains(lowerName, "彩云"):
|
||||
linkType = "mobile"
|
||||
case strings.Contains(lowerName, "微云"):
|
||||
linkType = "weiyun"
|
||||
case strings.Contains(lowerName, "蓝奏"):
|
||||
linkType = "lanzou"
|
||||
case strings.Contains(lowerName, "坚果"):
|
||||
linkType = "jianguoyun"
|
||||
case strings.Contains(lowerName, "123"):
|
||||
linkType = "123"
|
||||
case strings.Contains(lowerName, "pikpak"):
|
||||
|
||||
@@ -312,19 +312,6 @@ func (p *U3c3Plugin) parseSearchResults(html string) ([]model.SearchResult, erro
|
||||
}
|
||||
})
|
||||
|
||||
// 种子文件链接
|
||||
linkCell.Find("a[href$='.torrent']").Each(func(j int, link *goquery.Selection) {
|
||||
href, exists := link.Attr("href")
|
||||
if exists && href != "" {
|
||||
if !strings.HasPrefix(href, "http") {
|
||||
href = BaseURL + href
|
||||
}
|
||||
links = append(links, model.Link{
|
||||
URL: href,
|
||||
Type: "torrent",
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// 提取文件大小
|
||||
sizeText := strings.TrimSpace(s.Find("td:nth-child(4)").Text())
|
||||
|
||||
@@ -51,9 +51,6 @@ var (
|
||||
tianyiLinkRegex = regexp.MustCompile(`https?://cloud\.189\.cn/t/[0-9a-zA-Z]+`)
|
||||
link115Regex = regexp.MustCompile(`https?://115\.com/s/[0-9a-zA-Z]+`)
|
||||
mobileLinkRegex = regexp.MustCompile(`https?://caiyun\.feixin\.10086\.cn/[0-9a-zA-Z]+`)
|
||||
weiyunLinkRegex = regexp.MustCompile(`https?://share\.weiyun\.com/[0-9a-zA-Z]+`)
|
||||
lanzouLinkRegex = regexp.MustCompile(`https?://(www\.)?(lanzou[uixys]*|lan[zs]o[ux])\.(com|net|org)/[0-9a-zA-Z]+`)
|
||||
jianguoyunLinkRegex = regexp.MustCompile(`https?://(www\.)?jianguoyun\.com/p/[0-9a-zA-Z]+`)
|
||||
link123Regex = regexp.MustCompile(`https?://123pan\.com/s/[0-9a-zA-Z]+`)
|
||||
pikpakLinkRegex = regexp.MustCompile(`https?://mypikpak\.com/s/[0-9a-zA-Z]+`)
|
||||
magnetLinkRegex = regexp.MustCompile(`magnet:\?xt=urn:btih:[0-9a-fA-F]{40}`)
|
||||
@@ -345,18 +342,6 @@ func (p *WanouAsyncPlugin) determineLinkTypeOptimized(apiType, url string) strin
|
||||
if mobileLinkRegex.MatchString(url) {
|
||||
return "mobile"
|
||||
}
|
||||
case "WY":
|
||||
if weiyunLinkRegex.MatchString(url) {
|
||||
return "weiyun"
|
||||
}
|
||||
case "LZ":
|
||||
if lanzouLinkRegex.MatchString(url) {
|
||||
return "lanzou"
|
||||
}
|
||||
case "JGY":
|
||||
if jianguoyunLinkRegex.MatchString(url) {
|
||||
return "jianguoyun"
|
||||
}
|
||||
case "123":
|
||||
if link123Regex.MatchString(url) {
|
||||
return "123"
|
||||
@@ -383,12 +368,6 @@ func (p *WanouAsyncPlugin) determineLinkTypeOptimized(apiType, url string) strin
|
||||
return "115"
|
||||
case mobileLinkRegex.MatchString(url):
|
||||
return "mobile"
|
||||
case weiyunLinkRegex.MatchString(url):
|
||||
return "weiyun"
|
||||
case lanzouLinkRegex.MatchString(url):
|
||||
return "lanzou"
|
||||
case jianguoyunLinkRegex.MatchString(url):
|
||||
return "jianguoyun"
|
||||
case link123Regex.MatchString(url):
|
||||
return "123"
|
||||
case pikpakLinkRegex.MatchString(url):
|
||||
@@ -398,7 +377,7 @@ func (p *WanouAsyncPlugin) determineLinkTypeOptimized(apiType, url string) strin
|
||||
case ed2kLinkRegex.MatchString(url):
|
||||
return "ed2k"
|
||||
case quarkLinkRegex.MatchString(url):
|
||||
return "quark" // quark放到最后,因为已排除
|
||||
return "quark"
|
||||
default:
|
||||
return "" // 不支持的类型
|
||||
}
|
||||
@@ -423,12 +402,6 @@ func (p *WanouAsyncPlugin) determineLinkType(url string) string {
|
||||
return "115"
|
||||
case mobileLinkRegex.MatchString(url):
|
||||
return "mobile"
|
||||
case weiyunLinkRegex.MatchString(url):
|
||||
return "weiyun"
|
||||
case lanzouLinkRegex.MatchString(url):
|
||||
return "lanzou"
|
||||
case jianguoyunLinkRegex.MatchString(url):
|
||||
return "jianguoyun"
|
||||
case link123Regex.MatchString(url):
|
||||
return "123"
|
||||
case pikpakLinkRegex.MatchString(url):
|
||||
|
||||
@@ -328,7 +328,7 @@ func (p *YuhuagePlugin) parseDetailLinks(html string) []model.Link {
|
||||
}
|
||||
links = append(links, model.Link{
|
||||
URL: href,
|
||||
Type: "thunder",
|
||||
Type: "others",
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user