Skip to content

fatal error: runtime: out of memory #5

@ace-express

Description

@ace-express

/github.com/PuerkitoBio/goquery.(*Selection).Html(0xc434f4dc50, 0xc43d2efbe0, 0xc434f4c090, 0xc434f4c090, 0xc43d2efcd9)
/go/src/vendor/github.com/PuerkitoBio/goquery/property.go:109 +0x125 fp=0xc43d2efb38 sp=0xc43d2efad8 pc=0x6683a5
vendor/github.com/mauidude/go-readability.(*Document).sanitize(0xc4200c6000, 0xc44c0fc000, 0x38db56b, 0x3632419, 0x3632419)
/go/src/vendor/github.com/mauidude/go-readability/readability.go:449 +0x7b4 fp=0xc43d2efcf8 sp=0xc43d2efb38 pc=0x66cc14
vendor/github.com/mauidude/go-readability.(*Document).Content(0xc4200c6000, 0x3632419, 0xc4200c6000)
/go/src/vendor/github.com/mauidude/go-readability/readability.go:112 +0x9c fp=0xc43d2efd90 sp=0xc43d2efcf8 pc=0x66b5ec

source code:

`
func (d *Document) Content() string {
if d.content == "" {
d.prepareCandidates()

	article := d.getArticle()
	articleText := d.sanitize(article)

	length := len(strings.TrimSpace(articleText))
	if length < d.RetryLength {
		retry := true

		if d.RemoveUnlikelyCandidates {
			d.RemoveUnlikelyCandidates = false
		} else if d.WeightClasses {
			d.WeightClasses = false
		} else if d.CleanConditionally {
			d.CleanConditionally = false
		} else {
			d.content = articleText
			retry = false
		}

		if retry {
			Logger.Printf("Retrying with length %d < retry length %d\n", length, d.RetryLength)
			d.initializeHtml(d.input)
			articleText = d.Content()
		}
	}

	d.content = articleText
}

return d.content

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions