This commit is contained in:
Simon
2025-08-03 18:56:07 +00:00
parent 5dd92b21c4
commit b6f6212de0

View File

@@ -463,16 +463,18 @@ impl PerverzijaProvider {
); );
} }
} }
let stars_parts: Vec<&str> = text.split("<strong>Stars: </strong>").collect::<Vec<&str>>()[1].split("</div>").collect::<Vec<&str>>()[0].split("<a href=\"").collect::<Vec<&str>>(); if text.contains("<strong>Stars: </strong>"){
for star in stars_parts.iter().skip(1) { let stars_parts: Vec<&str> = text.split("<strong>Stars: </strong>").collect::<Vec<&str>>()[1].split("</div>").collect::<Vec<&str>>()[0].split("<a href=\"").collect::<Vec<&str>>();
if star.starts_with("https://tube.perverzija.com/stars/"){ for star in stars_parts.iter().skip(1) {
tags.push( if star.starts_with("https://tube.perverzija.com/stars/"){
star.split("/\"").collect::<Vec<&str>>()[0] tags.push(
.replace("https://tube.perverzija.com/stars/", "@stars:") star.split("/\"").collect::<Vec<&str>>()[0]
.to_string(), .replace("https://tube.perverzija.com/stars/", "@stars:")
); .to_string(),
} );
} }
}
}
let tags_parts: Vec<&str> = text.split("<strong>Tags: </strong>").collect::<Vec<&str>>()[1].split("</div>").collect::<Vec<&str>>()[0].split("<a href=\"").collect::<Vec<&str>>(); let tags_parts: Vec<&str> = text.split("<strong>Tags: </strong>").collect::<Vec<&str>>()[1].split("</div>").collect::<Vec<&str>>()[0].split("<a href=\"").collect::<Vec<&str>>();
for star in tags_parts.iter().skip(1) { for star in tags_parts.iter().skip(1) {