mirror of
https://github.com/lifegpc/pixiv_downloader.git
synced 2026-07-08 01:32:41 +08:00
use regex::Regex in pixiv link parse
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::ext::json::ToJson;
|
||||
use fancy_regex::Regex;
|
||||
use regex::Regex;
|
||||
use json::JsonValue;
|
||||
use reqwest::IntoUrl;
|
||||
use std::convert::TryInto;
|
||||
@@ -28,10 +28,6 @@ impl PixivID {
|
||||
return Some(PixivID::Artwork(num.unwrap()));
|
||||
}
|
||||
let re = RE.captures(s);
|
||||
if re.is_err() {
|
||||
return None;
|
||||
}
|
||||
let re = re.unwrap();
|
||||
if re.is_some() {
|
||||
let r = re.unwrap().name("id");
|
||||
if r.is_some() {
|
||||
|
||||
Reference in New Issue
Block a user