corrected url for search queries
This commit is contained in:
@@ -161,7 +161,7 @@ impl JavtifulProvider {
|
|||||||
_ => "",
|
_ => "",
|
||||||
};
|
};
|
||||||
let video_url = format!(
|
let video_url = format!(
|
||||||
"{}/videos{}?search_query={}&page={}",
|
"{}/search/videos{}?search_query={}&page={}",
|
||||||
self.url, sort_string, query.replace(" ","+"), page
|
self.url, sort_string, query.replace(" ","+"), page
|
||||||
);
|
);
|
||||||
// Check our Video Cache. If the result is younger than 1 hour, we return it.
|
// Check our Video Cache. If the result is younger than 1 hour, we return it.
|
||||||
@@ -180,7 +180,6 @@ impl JavtifulProvider {
|
|||||||
};
|
};
|
||||||
|
|
||||||
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_2)).await.unwrap();
|
||||||
if page > 1 && !text.contains(&format!("<li class=\"page-item active\"><span class=\"page-link\">{}</span>", page)) {
|
if page > 1 && !text.contains(&format!("<li class=\"page-item active\"><span class=\"page-link\">{}</span>", page)) {
|
||||||
eprint!("Javtiful query returned no results for page {}", page);
|
eprint!("Javtiful query returned no results for page {}", page);
|
||||||
@@ -239,7 +238,7 @@ impl JavtifulProvider {
|
|||||||
.into_iter()
|
.into_iter()
|
||||||
.inspect(|r| {
|
.inspect(|r| {
|
||||||
if let Err(e) = r {
|
if let Err(e) = r {
|
||||||
eprint!("Javtiful Provider: Failed to get video item");
|
eprint!("Javtiful Provider: Failed to get video item:{}\n", e);
|
||||||
let _ = futures::executor::block_on(send_discord_error_report(
|
let _ = futures::executor::block_on(send_discord_error_report(
|
||||||
&e,
|
&e,
|
||||||
Some("Javtiful Provider"),
|
Some("Javtiful Provider"),
|
||||||
|
|||||||
Reference in New Issue
Block a user