diff --git a/src/api.rs b/src/api.rs index 86a00fd..7d94339 100644 --- a/src/api.rs +++ b/src/api.rs @@ -434,7 +434,7 @@ async fn status(req: HttpRequest) -> Result { status.add_channel(Channel { id: "redtube".to_string(), name: "Redtube".to_string(), - description: "Redtube brings you NEW porn videos every day for free. Enjoy our XXX movies in high quality HD resolution on any device. Get fully immersed with the latest virtual reality sex videos from top adult studios. Stream all of the hottest porn movies from your favorite categories, pornstars and porn channels !".to_string(), + description: "Redtube brings you NEW porn videos every day for free".to_string(), premium: false, favicon: "https://www.google.com/s2/favicons?sz=64&domain=www.redtube.com".to_string(), status: "active".to_string(), diff --git a/src/providers/redtube.rs b/src/providers/redtube.rs index 1527f8d..2b655c0 100644 --- a/src/providers/redtube.rs +++ b/src/providers/redtube.rs @@ -231,12 +231,13 @@ impl RedtubeProvider { let id = vid.split("data-video-id=\"").collect::>()[1].split("\"").collect::>()[0].to_string(); let video_url = format!("{}/{}", self.url, id); let title = vid.split(format!("href=\"/{}\"",id).as_str()).collect::>()[1].split(">").collect::>()[1].split("<").collect::>()[0].trim().to_string(); - let thumb = vid.split(">()[1].split(" src=\"").collect::>()[1].split("\"").collect::>()[0].to_string(); + let thumb = vid.split(">()[1].split(" data-src=\"").collect::>()[1].split("\"").collect::>()[0].to_string(); let raw_duration = vid.split("").collect::>()[1].split("").collect::>()[0].trim().to_string(); let duration = parse_time_to_seconds(&raw_duration).unwrap_or(0) as u32; let views_str = vid.split("").collect::>()[1].split("").collect::>()[0].trim().to_string(); let views = parse_abbreviated_number(&views_str).unwrap_or(0) as u32; - + let preview = vid.split(">()[1].split(" data-mediabook=\"").collect::>()[1].split("\"").collect::>()[0].to_string(); + let video_item = VideoItem::new( id, title, @@ -245,8 +246,11 @@ impl RedtubeProvider { thumb, duration, ) - .views(views); + .views(views) + .preview(preview) + ; items.push(video_item); + break; } return items; }