added preview to pornhub

This commit is contained in:
Simon
2025-07-19 15:53:37 +00:00
parent 441780f29b
commit f88129ff39

View File

@@ -252,6 +252,8 @@ impl PornhubProvider {
.collect::<Vec<&str>>()[0]
.to_string();
let mut uploaderBlock = String::new();
let mut uploader_href = vec![];
let mut tag = String::new();
@@ -284,6 +286,15 @@ impl PornhubProvider {
video_item = video_item.tags(vec![tag])
.uploader(uploader_href[2].to_string());
}
if video_segment.contains("data-mediabook=\"") {
let preview = video_segment.split("data-mediabook=\"").collect::<Vec<&str>>()[1]
.split("\"")
.collect::<Vec<&str>>()[0]
.to_string();
video_item = video_item.preview(preview);
}
items.push(video_item);
}
return items;