Skip to content

Commit

Permalink
Drop url parsing support for beta.crunchyroll.com domain
Browse files Browse the repository at this point in the history
  • Loading branch information
bytedream committed May 4, 2024
1 parent 0914426 commit 5939a6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ pub enum UrlType {
#[cfg_attr(docsrs, doc(cfg(feature = "parse")))]
pub fn parse_url<S: AsRef<str>>(url: S) -> Option<UrlType> {
lazy_static::lazy_static! {
static ref SERIES_REGEX: Regex = Regex::new(r"^https?://((beta|www)\.)?crunchyroll\.com/([a-zA-Z]{2}(-[a-zA-Z]{2})?/)?(?P<type>series|movie_listing)/(?P<id>[^/]+).*$").unwrap();
static ref MUSIC_REGEX: Regex = Regex::new(r"^https?://((beta|www)\.)?crunchyroll\.com/([a-zA-Z]{2}(-[a-zA-Z]{2})?/)?watch/(?P<music_type>musicvideo|concert)/(?P<id>[^/]+).*$").unwrap();
static ref EPISODE_REGEX: Regex = Regex::new(r"^https?://((beta|www)\.)?crunchyroll\.com/([a-zA-Z]{2}(-[a-zA-Z]{2})?/)?watch/(?P<id>[^/]+).*$").unwrap();
static ref SERIES_REGEX: Regex = Regex::new(r"^https?://(www\.)?crunchyroll\.com/([a-zA-Z]{2}(-[a-zA-Z]{2})?/)?(?P<type>series|movie_listing)/(?P<id>[^/]+).*$").unwrap();
static ref MUSIC_REGEX: Regex = Regex::new(r"^https?://(www\.)?crunchyroll\.com/([a-zA-Z]{2}(-[a-zA-Z]{2})?/)?watch/(?P<music_type>musicvideo|concert)/(?P<id>[^/]+).*$").unwrap();
static ref EPISODE_REGEX: Regex = Regex::new(r"^https?://(www\.)?crunchyroll\.com/([a-zA-Z]{2}(-[a-zA-Z]{2})?/)?watch/(?P<id>[^/]+).*$").unwrap();
}

#[allow(clippy::manual_map)]
Expand Down

0 comments on commit 5939a6e

Please sign in to comment.