thumbnail bugfix
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user