Gorm silent, except in debug mode
This commit is contained in:
@@ -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":\[1,"\[(.*)]"]`)
|
||||
if err != nil {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package provider
|
||||
|
||||
type Provider interface {
|
||||
CleanUrlToSub(url string) string
|
||||
GetImageList(html string) (imageUrls []string, err error)
|
||||
GetHtml(url string) (html string, err error)
|
||||
GetNext(html string) (url string, err error)
|
||||
|
||||
Reference in New Issue
Block a user