f323ba1
use crate::parse::{EmbedRule, Platform};
use crate::Category;
pub struct Pixiv;
impl Platform for Pixiv {
fn id(&self) -> &'static str {
"pixiv"
}
fn name(&self) -> &'static str {
"Pixiv"
}
fn category(&self) -> Category {
Category::Social
}
fn domains(&self) -> &'static [&'static str] {
&["pixiv.net", "pixiv.me"]
}
fn embed_rule(&self) -> Option<EmbedRule> {
Some(EmbedRule::square(r"^/artworks/(\d+)", "https://embed.pixiv.net/decorate.php?illust_id={id}"))
}
}
pub static PLATFORM: Pixiv = Pixiv;