adapted to new layout

This commit is contained in:
Simon
2026-01-16 08:54:37 +00:00
parent 6a7bc68849
commit e7fb0ed723

View File

@@ -269,7 +269,7 @@ impl PimpbunnyProvider {
}; };
let mut requester = options.requester.clone().unwrap(); let mut requester = options.requester.clone().unwrap();
let text = requester.get(&video_url, Some(Version::HTTP_2)).await.unwrap(); let text = requester.get(&video_url, Some(Version::HTTP_11)).await.unwrap();
let video_items: Vec<VideoItem> = self let video_items: Vec<VideoItem> = self
.get_video_items_from_html(text.clone(), &mut requester) .get_video_items_from_html(text.clone(), &mut requester)
.await; .await;
@@ -365,9 +365,9 @@ impl PimpbunnyProvider {
} }
let block = match html let block = match html
.split("pb-pagination-wrapper") .split("-pagination-wrapper")
.next() .next()
.and_then(|s| s.split("pb-list-items").nth(1)) .and_then(|s| s.split("video_list").nth(2))
{ {
Some(b) => b, Some(b) => b,
None => return vec![], None => return vec![],
@@ -398,14 +398,13 @@ impl PimpbunnyProvider {
.to_string(); .to_string();
let mut title = seg let mut title = seg
.split("pb-item-title") .split("card-title")
.nth(1) .nth(1)
.and_then(|s| s.split('>').nth(1)) .and_then(|s| s.split('>').nth(1))
.and_then(|s| s.split('<').next()) .and_then(|s| s.split('<').next())
.ok_or_else(|| ErrorKind::Parse("video title".into()))? .ok_or_else(|| ErrorKind::Parse("video title".into()))?
.trim() .trim()
.to_string(); .to_string();
title = decode(title.as_bytes()).to_string().unwrap_or(title).titlecase(); title = decode(title.as_bytes()).to_string().unwrap_or(title).titlecase();
let id = video_url let id = video_url
@@ -416,7 +415,7 @@ impl PimpbunnyProvider {
.to_string(); .to_string();
let thumb_block = seg let thumb_block = seg
.split("pb-thumbnail") .split("card-thumbnail")
.nth(1) .nth(1)
.ok_or_else(|| ErrorKind::Parse("thumb block".into()))?; .ok_or_else(|| ErrorKind::Parse("thumb block".into()))?;