readability for golang
Golang版本是根据readabiliity for node.js以及readability for python所改写,并加入了些自己的,比如支持gzip等。
github.com/PuerkitoBio/goquery
github.com/axgle/mahonia
package main
import (
"fmt"
"github.com/ying32/readability"
)
func main() {
test, err := readability.NewReadability("http://wd.leiting.com/home/news/news_detail.php?id=599")
if err != nil {
fmt.Println("failed.", err)
return
}
test.Parse()
fmt.Println(test.Title)
fmt.Println(test.Content)
}