adapted to new layout
This commit is contained in:
@@ -269,7 +269,7 @@ impl PimpbunnyProvider {
|
||||
};
|
||||
|
||||
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
|
||||
.get_video_items_from_html(text.clone(), &mut requester)
|
||||
.await;
|
||||
@@ -365,9 +365,9 @@ impl PimpbunnyProvider {
|
||||
}
|
||||
|
||||
let block = match html
|
||||
.split("pb-pagination-wrapper")
|
||||
.split("-pagination-wrapper")
|
||||
.next()
|
||||
.and_then(|s| s.split("pb-list-items").nth(1))
|
||||
.and_then(|s| s.split("video_list").nth(2))
|
||||
{
|
||||
Some(b) => b,
|
||||
None => return vec![],
|
||||
@@ -398,14 +398,13 @@ impl PimpbunnyProvider {
|
||||
.to_string();
|
||||
|
||||
let mut title = seg
|
||||
.split("pb-item-title")
|
||||
.split("card-title")
|
||||
.nth(1)
|
||||
.and_then(|s| s.split('>').nth(1))
|
||||
.and_then(|s| s.split('<').next())
|
||||
.ok_or_else(|| ErrorKind::Parse("video title".into()))?
|
||||
.trim()
|
||||
.to_string();
|
||||
|
||||
title = decode(title.as_bytes()).to_string().unwrap_or(title).titlecase();
|
||||
|
||||
let id = video_url
|
||||
@@ -416,7 +415,7 @@ impl PimpbunnyProvider {
|
||||
.to_string();
|
||||
|
||||
let thumb_block = seg
|
||||
.split("pb-thumbnail")
|
||||
.split("card-thumbnail")
|
||||
.nth(1)
|
||||
.ok_or_else(|| ErrorKind::Parse("thumb block".into()))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user