This commit is contained in:
Simon
2025-08-16 18:56:19 +00:00
parent 49ca76ab48
commit 750be251c0

View File

@@ -193,10 +193,10 @@ impl HentaihavenProvider {
.to_vec() .to_vec()
; ;
for video_segment in &raw_videos { for video_segment in &raw_videos {
let vid = video_segment.split("\n").collect::<Vec<&str>>(); // let vid = video_segment.split("\n").collect::<Vec<&str>>();
for (index, line) in vid.iter().enumerate() { // for (index, line) in vid.iter().enumerate() {
println!("Line {}: {}", index, line); // println!("Line {}: {}", index, line);
} // }
let episode_count = video_segment.split("chapter font-meta").collect::<Vec<&str>>()[1] let episode_count = video_segment.split("chapter font-meta").collect::<Vec<&str>>()[1]
.split("class=\"btn-link\">").collect::<Vec<&str>>()[1] .split("class=\"btn-link\">").collect::<Vec<&str>>()[1]
@@ -207,7 +207,6 @@ impl HentaihavenProvider {
.split("class=\"btn-link\">").collect::<Vec<&str>>()[1] .split("class=\"btn-link\">").collect::<Vec<&str>>()[1]
.split("<").collect::<Vec<&str>>()[0] .split("<").collect::<Vec<&str>>()[0]
.split(" ").collect::<Vec<&str>>()[1] == "Season" ; .split(" ").collect::<Vec<&str>>()[1] == "Season" ;
println!("{:?}",video_segment.split("chapter font-meta").collect::<Vec<&str>>()[1]
.split("href=\"").collect::<Vec<&str>>()[1] .split("href=\"").collect::<Vec<&str>>()[1]
.split("\"").collect::<Vec<&str>>()[0] .split("\"").collect::<Vec<&str>>()[0]
.split("/").collect::<Vec<&str>>()[4]); .split("/").collect::<Vec<&str>>()[4]);
@@ -239,10 +238,12 @@ impl HentaihavenProvider {
true => video_segment.split("<img ").collect::<Vec<&str>>()[1] true => video_segment.split("<img ").collect::<Vec<&str>>()[1]
.split("data-src=\"").collect::<Vec<&str>>()[1] .split("data-src=\"").collect::<Vec<&str>>()[1]
.split("\"").collect::<Vec<&str>>()[0] .split("\"").collect::<Vec<&str>>()[0]
.replace(" ", "%20")
.to_string(), .to_string(),
false =>video_segment.split("<img ").collect::<Vec<&str>>()[1] false =>video_segment.split("<img ").collect::<Vec<&str>>()[1]
.split("src=\"").collect::<Vec<&str>>()[1] .split("src=\"").collect::<Vec<&str>>()[1]
.split("\"").collect::<Vec<&str>>()[0] .split("\"").collect::<Vec<&str>>()[0]
.replace(" ", "%20")
.to_string() .to_string()
}; };
items.push(VideoItem::new( items.push(VideoItem::new(
@@ -253,7 +254,7 @@ impl HentaihavenProvider {
thumb, thumb,
0, // duration is not available 0, // duration is not available
) )
.aspect_ratio(0.73) // .aspect_ratio(0.73)
); );
} }
} }