We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f68d3a commit 5862b88Copy full SHA for 5862b88
1 file changed
internal/fetcher/body.go
@@ -96,16 +96,15 @@ func Boxun(p *Post) (string, error) {
96
if len(nodes) == 0 {
97
return "", errors.New("[-] There is no tag named `<td class=F11>` from: " + p.URL.String())
98
}
99
- articleDoc := nodes[0].FirstChild
100
- blist := ElementsNextByTag(articleDoc, "br")
+ blist := ElementsNextByTag(nodes[0], "br")
101
for _, b := range blist {
102
- if b.NextSibling == nil || b.NextSibling.Type != html.TextNode || b.NextSibling.Data == "" {
+ if b.Type != html.TextNode || b.Data == "" {
103
continue
104
} else {
105
- body += b.NextSibling.Data
+ body += strings.ReplaceAll(b.Data, "\u00a0", "")
106
107
108
-
+ gears.ConvertToUtf8(&body, "gbk", "utf8")
109
return body, nil
110
111
0 commit comments