This commit is contained in:
parent
c33a997dc5
commit
57507756ec
14 changed files with 864 additions and 97 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue