Skip to content

Commit 81e4889

Browse files
committed
fix: icon links are no only with exact rel="ico"
Some pages now have icons in links with rel="shortcut icon" for example
1 parent 9b4686c commit 81e4889

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

goscraper.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func (scraper *Scraper) parseDocument(doc *Document) error {
197197
if cleanStr(attr.Key) == "rel" && cleanStr(attr.Val) == "canonical" {
198198
canonical = true
199199
}
200-
if cleanStr(attr.Key) == "rel" && cleanStr(attr.Val) == "icon" {
200+
if cleanStr(attr.Key) == "rel" && strings.Contains(cleanStr(attr.Val), "icon") {
201201
hasIcon = true
202202
}
203203
if cleanStr(attr.Key) == "href" {

0 commit comments

Comments
 (0)