hotfix
This commit is contained in:
@@ -26,7 +26,7 @@ pub struct Porn00Provider {
|
|||||||
impl Porn00Provider {
|
impl Porn00Provider {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Porn00Provider {
|
Porn00Provider {
|
||||||
url: "www.porn00.org".to_string(),
|
url: "https://www.porn00.org".to_string(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async fn get(
|
async fn get(
|
||||||
@@ -48,7 +48,7 @@ impl Porn00Provider {
|
|||||||
_ => "list_videos_most_recent_videos",
|
_ => "list_videos_most_recent_videos",
|
||||||
};
|
};
|
||||||
|
|
||||||
let video_url = format!("{}{}?mode=async^&function=get_block^&block_id={}^&from={}", self.url, sort_string, list_str, page);
|
let video_url = format!("{}{}/?mode=async^&function=get_block^&block_id={}^&from={}", self.url, sort_string, list_str, page);
|
||||||
let old_items = match cache.get(&video_url) {
|
let old_items = match cache.get(&video_url) {
|
||||||
Some((time, items)) => {
|
Some((time, items)) => {
|
||||||
if time.elapsed().unwrap_or_default().as_secs() < 60 * 5 {
|
if time.elapsed().unwrap_or_default().as_secs() < 60 * 5 {
|
||||||
@@ -64,6 +64,7 @@ impl Porn00Provider {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let mut requester = options.requester.clone().unwrap();
|
let mut requester = options.requester.clone().unwrap();
|
||||||
|
|
||||||
let text = requester.get(&video_url).await.unwrap();
|
let text = requester.get(&video_url).await.unwrap();
|
||||||
let video_items: Vec<VideoItem> = self.get_video_items_from_html(text.clone());
|
let video_items: Vec<VideoItem> = self.get_video_items_from_html(text.clone());
|
||||||
if !video_items.is_empty() {
|
if !video_items.is_empty() {
|
||||||
@@ -196,7 +197,7 @@ impl Porn00Provider {
|
|||||||
id,
|
id,
|
||||||
title,
|
title,
|
||||||
video_url.to_string(),
|
video_url.to_string(),
|
||||||
"hentaimoon".to_string(),
|
"porn00".to_string(),
|
||||||
thumb,
|
thumb,
|
||||||
duration,
|
duration,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user