thumbnail bugfix

This commit is contained in:
Simon
2025-10-25 15:13:39 +00:00
parent e79fd15b91
commit 4d2470e028

View File

@@ -185,11 +185,17 @@ impl PornxpProvider {
title = decode(title.as_bytes()).to_string().unwrap_or(title);
let id = video_url.split("/").collect::<Vec<&str>>()[4].to_string();
let thumb = format!("https:{}", video_segment.split("<img ").collect::<Vec<&str>>()[1]
let thumb = match video_segment.contains("<img class=\"item_img lazy\""){
true => format!("https:{}", video_segment.split("<img ").collect::<Vec<&str>>()[1]
.split("data-src=\"").collect::<Vec<&str>>()[1]
.split("\"")
.collect::<Vec<&str>>()[0]
.to_string()),
false => format!("https:{}", video_segment.split("<img ").collect::<Vec<&str>>()[1]
.split("src=\"").collect::<Vec<&str>>()[1]
.split("\"")
.collect::<Vec<&str>>()[0]
.to_string());
.to_string()),};
let raw_duration = video_segment
.split("<div class=\"item_dur\">")
.collect::<Vec<&str>>()[1]