|
@@ -692,8 +692,14 @@ func BodyAnalysis2(body string) (expertNumStr, expertContentStr, interviewDateSt
|
|
|
numEnd := strings.Index(v, ".pdf")
|
|
|
fileLink = v[numStar : numEnd+4]
|
|
|
}
|
|
|
- if strings.Index(v, ".pdf") > 0 {
|
|
|
- body = strings.Replace(body, v, "", -1)
|
|
|
+ //处理a标签中的PDF
|
|
|
+ numStarAcount := strings.Index(v, "<a")
|
|
|
+ numEndAcount := strings.Index(v, "<img")
|
|
|
+ if numStarAcount < numEndAcount && strings.Index(fileLink, ".pdf") > 0 {
|
|
|
+ Acount := v[numStarAcount:numEndAcount]
|
|
|
+ if Acount != "" {
|
|
|
+ body = strings.Replace(body, Acount, "", -1)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if !strings.HasPrefix(fileLink, "https") && len(fileLink) > 0 {
|