get rid of ads

This commit is contained in:
Brandon Thomas committed 2023-02-19 06:21:11 -05:00
1 parent 896938b762
commit ab6e3ceb5a
2 files changed
+10 -2

No files matched your search

@@ -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());
}
}
@@ -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
}