Gorm silent, except in debug mode

This commit is contained in:
Pablu23
2024-05-30 23:58:18 +02:00
parent 766da5aeb2
commit e5e7c4eb54
5 changed files with 36 additions and 11 deletions

View File

@@ -7,12 +7,19 @@ import (
"net/http"
"regexp"
"strconv"
"strings"
"github.com/rs/zerolog/log"
)
type Bato struct{}
func (b *Bato) CleanUrlToSub(url string) string {
trimmed := strings.TrimPrefix(url, "https://bato.to/title")
trimmed = strings.Trim(trimmed, "/")
return trimmed
}
func (b *Bato) GetImageList(html string) ([]string, error) {
reg, err := regexp.Compile(`<astro-island.*props=".*;imageFiles&quot;:\[1,&quot;\[(.*)]&quot;]`)
if err != nil {