Skip to content

Conversation

bobuhiro11
Copy link

The init function defined in the go-charset package must be called.
The following code causes a related bug.

$ cat test.go
package main

import (
        "github.com/advancedlogic/GoOse"
)

func main() {
        g := goose.New()
        url := "http://blog.livedoor.jp/unahide/archives/52966628.html"
        article, _ := g.ExtractFromURL(url)
        println("title", article.Title)
        println("description", article.MetaDescription)
        println("keywords", article.MetaKeywords)
        println("content", article.CleanedText)
        println("url", article.FinalURL)
        println("top image", article.TopImage)
}
$ go run test.go
charset: cannot open "charsets.json": open /usr/local/lib/go-charset/datafiles/charsets.json: no such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant