Init Instant Answers
Some checks failed
Run Integration Tests / test (push) Failing after 49s

This commit is contained in:
partisan 2025-06-25 23:23:33 +02:00
parent c33a997dc5
commit 57507756ec
14 changed files with 864 additions and 97 deletions

View file

@ -16,7 +16,6 @@ import (
"net/url"
"os"
"path/filepath"
"regexp"
"strings"
"sync"
"time"
@ -45,9 +44,6 @@ var (
"/apple-touch-icon.png",
"/apple-touch-icon-precomposed.png",
}
// Regex to extract favicon URLs from HTML
iconLinkRegex = regexp.MustCompile(`<link[^>]+rel=["'](?:icon|shortcut icon|apple-touch-icon)["'][^>]+href=["']([^"']+)["']`)
)
// Add this near the top with other vars
@ -372,7 +368,7 @@ func cacheFavicon(imageURL, imageID string) (string, bool, error) {
// }
// Debug
fmt.Printf("Downloading favicon [%s] for ID [%s]\n", imageURL, imageID)
printDebug("Downloading favicon ID: %s\n", imageID)
filename := fmt.Sprintf("%s_icon.webp", imageID)
imageCacheDir := filepath.Join(config.DriveCache.Path, "images")