You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the latest version there is a helper function named CreateReadableDocument which expose that functionality. So now you can use it like this:
result, _:=trafilatura.Extract(r, opts)
readableDoc:=trafilatura.CreateReadableDocument(result)
// To print the HTML output, you can use it with go-shiori/dom packagefmt.Println(dom.OuterHTML(readableDoc))
It would be nice if there was a library method for outputting the html nodes from the library, similar to how it is done in the cli, which is difficult to copy since it references internal functions.
https://github.com/markusmobius/go-trafilatura/blob/main/cmd/go-trafilatura/output.go#L81-L147
The text was updated successfully, but these errors were encountered: