From 253d8712c81b3389aa2aafac14334455c9a7e708 Mon Sep 17 00:00:00 2001 From: bytedream Date: Fri, 15 Apr 2022 22:34:45 +0200 Subject: [PATCH] Add /videos suffix support for classic series url --- crunchyroll.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crunchyroll.go b/crunchyroll.go index 3717eb3..d34ba81 100644 --- a/crunchyroll.go +++ b/crunchyroll.go @@ -354,7 +354,7 @@ func (c *Crunchyroll) FindEpisodeByName(seriesName, episodeTitle string) ([]*Epi // if possible since beta url are always safe to use. // The method will stay in the library until only beta urls are supported by crunchyroll itself. func ParseVideoURL(url string) (seriesName string, ok bool) { - pattern := regexp.MustCompile(`(?m)^https?://(www\.)?crunchyroll\.com(/\w{2}(-\w{2})?)?/(?P[^/]+)/?$`) + pattern := regexp.MustCompile(`(?m)^https?://(www\.)?crunchyroll\.com(/\w{2}(-\w{2})?)?/(?P[^/]+)(/videos)?/?$`) if urlMatch := pattern.FindAllStringSubmatch(url, -1); len(urlMatch) != 0 { groups := regexGroups(urlMatch, pattern.SubexpNames()...) seriesName = groups["series"]