hot fix bug
This commit is contained in:
@@ -233,21 +233,22 @@ impl PerverzijaProvider {
|
||||
};
|
||||
let duration = parse_time_to_seconds(&raw_duration).unwrap_or(0) as u32;
|
||||
|
||||
let thumb = match vid[4].contains("srcset=") {
|
||||
true => vid[4].split("sizes=").collect::<Vec<&str>>()[1]
|
||||
.split("w, ")
|
||||
.collect::<Vec<&str>>()
|
||||
.last()
|
||||
.unwrap()
|
||||
.to_string()
|
||||
.split(" ")
|
||||
.collect::<Vec<&str>>()[0]
|
||||
.to_string(),
|
||||
false => vid[4].split("src=\"").collect::<Vec<&str>>()[1]
|
||||
if !vid[4].contains("srcset=") && vid[4].split("src=\"").collect::<Vec<&str>>().len() == 1{
|
||||
for (index, line) in vid.iter().enumerate(){
|
||||
println!("Line {}: {}\n\n", index, line);
|
||||
}
|
||||
}
|
||||
|
||||
let mut thumb = "".to_string();
|
||||
for v in vid.clone(){
|
||||
let line = v.trim();
|
||||
if line.starts_with("<img "){
|
||||
thumb = line.split(" src=\"").collect::<Vec<&str>>()[1]
|
||||
.split("\"")
|
||||
.collect::<Vec<&str>>()[0]
|
||||
.to_string(),
|
||||
};
|
||||
.to_string();
|
||||
}
|
||||
}
|
||||
let embed_html = vid[1].split("data-embed='").collect::<Vec<&str>>()[1]
|
||||
.split("'")
|
||||
.collect::<Vec<&str>>()[0]
|
||||
|
||||
Reference in New Issue
Block a user