mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-10 03:51:25 +00:00
get rid of ads
This commit is contained in:
1 parent
896938b762
commit
ab6e3ceb5a
2 files changed
+10
-2
No files matched your search
+1
-1
@@ -90,7 +90,7 @@ fn split_into_manageable_portions(text: &str) -> Vec<String> {
|
||||
if trimmed_paragraph.len() > 250 {
|
||||
speakable_portions.extend(split_paragraph(&trimmed_paragraph));
|
||||
} else {
|
||||
speakable_portions.push(paragraph.to_string());
|
||||
speakable_portions.push(trimmed_paragraph.to_string());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-1
@@ -3,9 +3,17 @@ use sqlite_queries::queries::by_table::news_story_productions::list::news_story_
|
||||
|
||||
pub fn cnn_greenlighting(target: &NewsStoryProductionItem) -> Option<SkipReason> {
|
||||
|
||||
if target.original_news_canonical_url.contains("/deals/") {
|
||||
if target.original_news_canonical_url.contains("/deals/")
|
||||
|| target.original_news_canonical_url.contains("cnn-underscored") {
|
||||
// We got a 3-minute long ad for Levi's with the "/deals/" URL.
|
||||
// CNN underscored is nothing but ads: https://www.cnn.com/cnn-underscored
|
||||
return Some(SkipReason::Advertisement);
|
||||
}
|
||||
|
||||
if target.original_news_canonical_url.contains("/videos/") {
|
||||
// Video content tends to have little text
|
||||
return Some(SkipReason::VideoContent);
|
||||
}
|
||||
|
||||
None
|
||||
}
|
||||
Reference in new issue
Block a user