This commit is contained in:
Tomas Dvorak committed 2026-02-24 10:33:59 +01:00
1 parent 409acd2e08
commit 898a3c303f
1374 files changed
+290408 -29186

No files matched your search

+2 -15
View File
@@ -7,6 +7,7 @@ import (
"time"
"github.com/PuerkitoBio/goquery"
"github.com/yourorg/devour/pkg/parserutil"
)
type Parser struct {
@@ -609,21 +610,7 @@ func extractKindFromClasses(classes string) string {
}
func resolveURL(base string, href string) string {
if strings.HasPrefix(href, "http") {
return href
}
baseURL, err := url.Parse(base)
if err != nil {
return href
}
hrefURL, err := url.Parse(href)
if err != nil {
return href
}
return baseURL.ResolveReference(hrefURL).String()
return parserutil.ResolveURL(base, href)
}
func cleanText(text string) string {