added preview to pornhub
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user