server: add slurp configs for facebook and redox
This commit is contained in:
parent
91eb3019f9
commit
1985ae1f49
@ -176,10 +176,16 @@ pub async fn thread(pool: &PgPool, thread_id: String) -> Result<Thread, ServerEr
|
|||||||
let body_tranformers: Vec<Box<dyn Transformer>> = vec![
|
let body_tranformers: Vec<Box<dyn Transformer>> = vec![
|
||||||
Box::new(SlurpContents {
|
Box::new(SlurpContents {
|
||||||
site_selectors: hashmap![
|
site_selectors: hashmap![
|
||||||
|
"atmeta.com".to_string() => vec![
|
||||||
|
Selector::parse("div.entry-content").unwrap(),
|
||||||
|
],
|
||||||
"blog.cloudflare.com".to_string() => vec![
|
"blog.cloudflare.com".to_string() => vec![
|
||||||
Selector::parse(".author-lists").unwrap(),
|
Selector::parse(".author-lists").unwrap(),
|
||||||
Selector::parse(".post-full-content").unwrap()
|
Selector::parse(".post-full-content").unwrap()
|
||||||
],
|
],
|
||||||
|
"engineering.fb.com".to_string() => vec![
|
||||||
|
Selector::parse("article").unwrap(),
|
||||||
|
],
|
||||||
"hackaday.com".to_string() => vec![
|
"hackaday.com".to_string() => vec![
|
||||||
Selector::parse("div.entry-featured-image").unwrap(),
|
Selector::parse("div.entry-featured-image").unwrap(),
|
||||||
Selector::parse("div.entry-content").unwrap()
|
Selector::parse("div.entry-content").unwrap()
|
||||||
@ -192,6 +198,9 @@ pub async fn thread(pool: &PgPool, thread_id: String) -> Result<Thread, ServerEr
|
|||||||
Selector::parse("span.story-byline").unwrap(),
|
Selector::parse("span.story-byline").unwrap(),
|
||||||
Selector::parse("div.p").unwrap(),
|
Selector::parse("div.p").unwrap(),
|
||||||
],
|
],
|
||||||
|
"www.redox-os.org".to_string() => vec![
|
||||||
|
Selector::parse("div.content").unwrap(),
|
||||||
|
],
|
||||||
"www.smbc-comics.com".to_string() => vec![
|
"www.smbc-comics.com".to_string() => vec![
|
||||||
Selector::parse("img#cc-comic").unwrap(),
|
Selector::parse("img#cc-comic").unwrap(),
|
||||||
Selector::parse("div#aftercomic img").unwrap(),
|
Selector::parse("div#aftercomic img").unwrap(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user