bugfixes
This commit is contained in:
@@ -212,7 +212,7 @@ impl HypnotubeProvider {
|
||||
.await
|
||||
.unwrap();
|
||||
if text.contains("Sorry, no results were found.") {
|
||||
eprint!("Hypnotube query returned no results for page {}", page);
|
||||
eprintln!("Hypnotube query returned no results for page {}", page);
|
||||
return vec![];
|
||||
}
|
||||
let video_items: Vec<VideoItem> = self.get_video_items_from_html(text.clone()).await;
|
||||
|
||||
@@ -232,6 +232,7 @@ impl JavtifulProvider {
|
||||
let futures = block
|
||||
.split("card ")
|
||||
.skip(1)
|
||||
.filter(|seg| !seg.contains("SPONSOR"))
|
||||
.map(|el| self.get_video_item(el.to_string(), requester.clone()));
|
||||
|
||||
join_all(futures)
|
||||
@@ -278,7 +279,7 @@ impl JavtifulProvider {
|
||||
.split(" alt=\"")
|
||||
.nth(1)
|
||||
.and_then(|s| s.split('"').next())
|
||||
.ok_or_else(|| ErrorKind::Parse("video title".into()))?
|
||||
.ok_or_else(|| ErrorKind::Parse(format!("video title\n\n{seg}").into()))?
|
||||
.trim()
|
||||
.to_string();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user