1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

fix(filter): skip invalid rules instead of exiting the loop

This commit is contained in:
Frédéric Guillot 2025-06-19 12:31:49 -07:00
parent 6282ac1f38
commit bc6ab44ff2
4 changed files with 70 additions and 56 deletions

View file

@ -38,7 +38,7 @@ func fetchWatchTime(websiteURL, query string, isoDate bool) (int, error) {
duration, exists := doc.FindMatcher(goquery.Single(query)).Attr("content")
if !exists {
return 0, errors.New("duration has not found")
return 0, errors.New("duration not found")
}
ret := 0

View file

@ -27,7 +27,7 @@ func parseISO8601(from string) (time.Duration, error) {
if iso8601Regex.MatchString(from) {
match = iso8601Regex.FindStringSubmatch(from)
} else {
return 0, errors.New("youtube: could not parse duration string")
return 0, errors.New("processor: could not parse duration string")
}
for i, name := range iso8601Regex.SubexpNames() {
@ -49,7 +49,7 @@ func parseISO8601(from string) (time.Duration, error) {
case "second":
d += time.Duration(val) * time.Second
default:
return 0, fmt.Errorf("youtube: unknown field %s", name)
return 0, fmt.Errorf("processor: unknown field %s", name)
}
}