readability for golang
Golang版本是根据readabiliity for node.js以及readability for python所改写,并加入了些自己的,比如支持gzip等。
引用的第三方包使用方法github.com/PuerkitoBio/goquery
github.com/axgle/mahonia
package mainimport ( "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)}源代码
github.com/ying32/readability
总结以上是内存溢出为你收集整理的Golang 文章正文抽取(readability)全部内容,希望文章能够帮你解决Golang 文章正文抽取(readability)所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)