more pimpbunny fixes

This commit is contained in:
Simon
2026-02-15 11:16:25 +00:00
parent 1bed8c56a0
commit 5105d33212

View File

@@ -291,7 +291,7 @@ impl PimpbunnyProvider {
let search_string = query.trim().to_string();
let mut video_url = format!(
"{}/search/{}/?mode=async&function=get_block&block_id=list_videos_videos_list_search_result&videos_per_page=20&from_videos={}",
"{}/search/{}/?mode=async&function=get_block&block_id=list_videos_videos_list_search_result&videos_per_page=32&from_videos={}",
self.url, search_string.replace(" ","-"), page
);
@@ -340,7 +340,7 @@ impl PimpbunnyProvider {
};
let mut requester = options.requester.clone().unwrap();
println!("Fetching URL: {}", video_url);
let text = requester.get(&video_url, Some(Version::HTTP_2)).await.unwrap();
let video_items: Vec<VideoItem> = self
.get_video_items_from_html(text.clone(), &mut requester)
@@ -366,7 +366,7 @@ impl PimpbunnyProvider {
let block = match html
.split("-pagination-wrapper")
.next()
.and_then(|s| s.split("list_items").nth(1))
.and_then(|s| s.split("videos_videos_list").nth(2))
{
Some(b) => b,
None => return vec![],
@@ -425,9 +425,9 @@ impl PimpbunnyProvider {
.unwrap_or("")
.to_string();
if thumb.starts_with("data:image") {
if thumb.contains("data:image/jpg;base64") {
thumb = thumb_block
.split("data-webp=\"")
.split("data-original=\"")
.nth(1)
.and_then(|s| s.split('"').next())
.unwrap_or("")