handle some 3'th party errors, init scraper features

This commit is contained in:
yggverse 2026-01-07 18:25:21 +02:00
parent 6bf89cbc3e
commit d8f2d723f5
4 changed files with 84 additions and 20 deletions

View file

@ -1,3 +1,4 @@
use scraper::Selector;
use serde::Deserialize;
use url::Url;
@ -20,14 +21,19 @@ pub struct Channel {
pub persist_item_title: bool,
/// Save item description
pub persist_item_description: bool,
/// Scrape title by CSS selector
/// * None to ignore
pub content_title_selector: Option<Selector>,
/// Scrape description by CSS selector
/// * None to ignore
pub content_description_selector: Option<Selector>,
}
#[derive(Debug, Deserialize)]
pub struct Config {
pub mysql: Mysql,
pub channel: Vec<Channel>,
/// Update timeout in seconds
///
/// Channels update timeout in seconds
/// * None to generate once
pub update: Option<u64>,
}