diff --git a/src/providers/omgxxx.rs b/src/providers/omgxxx.rs index 7b67795..166a3be 100644 --- a/src/providers/omgxxx.rs +++ b/src/providers/omgxxx.rs @@ -1111,48 +1111,54 @@ impl OmgxxxProvider { .unwrap_or_default() .to_string(); - let thumb = match video_segment - .split("img loading") + // Skip advertisement cards. They reuse class="item" but link to an + // external ad network instead of an omg.xxx video (and embed an + // + + +
+ + Lazy Video + 08:30 + +
+ + "## + .to_string(); + + let items = provider.get_video_items_from_html(html); + + // The advertisement card must be filtered out. + assert_eq!(items.len(), 2); + assert!(items.iter().all(|item| item.url.contains("/videos/"))); + assert!( + !items + .iter() + .any(|item| item.title.contains("AI Cum Slut")) + ); + + // Thumbnails must be real CDN URLs, never empty or base64 placeholders. + for item in &items { + assert!( + item.thumb.starts_with("https://img.omg.xxx/"), + "unexpected thumb: {:?}", + item.thumb + ); + assert!(!item.thumb.starts_with("data:")); + } + + assert_eq!(items[0].id, "93816267"); + assert_eq!( + items[0].thumb, + "https://img.omg.xxx/93816000/93816267/medium@2x/1.jpg" + ); + assert_eq!(items[1].id, "93816269"); + assert_eq!( + items[1].thumb, + "https://img.omg.xxx/93816000/93816269/medium@2x/1.jpg" + ); + } } #[async_trait]