mirror of
https://github.com/mrfluffy-dev/kami.git
synced 2026-01-17 04:50:32 +00:00
thanks coolanx for the amazing regex
This commit is contained in:
@@ -66,7 +66,7 @@ pub fn get_anime_link(url: &str, episode: u64) -> String {
|
|||||||
episode
|
episode
|
||||||
);
|
);
|
||||||
let html = get_anime_html(url);
|
let html = get_anime_html(url);
|
||||||
let re = Regex::new(r#"iframe id="main-embed" src="//yugen\.to/e/([^/]*)/"#).unwrap();
|
let re = Regex::new(r#"/e/([^/]*)"#).unwrap();
|
||||||
let capture = re.captures(&html).unwrap();
|
let capture = re.captures(&html).unwrap();
|
||||||
let id = &capture[1];
|
let id = &capture[1];
|
||||||
let id = format!("id={}%3D&ac=0", id);
|
let id = format!("id={}%3D&ac=0", id);
|
||||||
|
|||||||
Reference in New Issue
Block a user