tildes-parser/source/selectors.rs

32 lines
1.1 KiB
Rust
Raw Normal View History

2022-09-29 23:29:46 +00:00
//! All [`Selector`]s used in parsing.
use {lazy_static::lazy_static, scraper::Selector};
use crate::utilities::selector;
lazy_static! {
2022-10-03 14:25:28 +00:00
/// Selector for the group description.
pub static ref GROUP_DESCRIPTION: Selector = selector(".group-short-description");
2022-09-29 23:29:46 +00:00
/// Selector for links to Tildes groups.
pub static ref GROUP_LINK: Selector = selector(".link-group");
/// Selector for the activity section in group list items.
pub static ref GROUP_LIST_ACTIVITY: Selector = selector(".group-list-activity");
/// Selector for the description section in group list items.
pub static ref GROUP_LIST_DESCRIPTION: Selector = selector(".group-list-description");
2022-10-03 14:25:28 +00:00
/// Selector for the group name.
pub static ref GROUP_NAME: Selector = selector("#sidebar h3");
/// Selector for the group subscriber count.
pub static ref GROUP_SUBSCRIBERS: Selector = selector(".group-subscription-count");
/// Selector for group wiki links.
pub static ref GROUP_SUB_GROUP_LINKS: Selector = selector(r#"#sidebar .link-group"#);
/// Selector for group wiki links.
pub static ref GROUP_WIKI_LINKS: Selector = selector(r#"#sidebar [href*="/wiki/"]"#);
2022-09-29 23:29:46 +00:00
}