fixed regex, now accepts formats with number on them

This commit is contained in:
danmax 2024-10-15 01:02:33 -04:00
parent 4116d8a8d4
commit da3575e905

View File

@ -60,7 +60,7 @@ fn extract_urls(html: &str) -> Vec<String> {
}
fn extract_img_url(html: &str) -> String {
let re = Regex::new(r"https://us\.rule34\.xxx//([A-Za-z0-9]+(/[A-Za-z0-9]+)+)\.[A-Za-z]+\?[0-9]+").unwrap();
let re = Regex::new(r"https://us\.rule34\.xxx//([A-Za-z0-9]+(/[A-Za-z0-9]+)+)\.[A-Za-z0-9]+\?[0-9]+").unwrap();
match re.find(html) {
Some(img_url) => img_url.as_str().to_string(),
None => String::new(),