fixed warnings
This commit is contained in:
@@ -68,7 +68,6 @@ enum Target {
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
struct ListStub {
|
||||
slug: String,
|
||||
detail_url: String,
|
||||
title: String,
|
||||
thumb: String,
|
||||
@@ -78,7 +77,6 @@ struct ListStub {
|
||||
#[derive(Debug, Clone, Default)]
|
||||
struct DetailMetadata {
|
||||
title: Option<String>,
|
||||
description: Option<String>,
|
||||
thumb: Option<String>,
|
||||
studio: Option<(String, String)>,
|
||||
categories: Vec<(String, String)>,
|
||||
@@ -762,18 +760,17 @@ impl Pornhd3xProvider {
|
||||
.map(|value| self.normalize_url(value))
|
||||
.filter(|value| !value.is_empty());
|
||||
|
||||
let slug = detail_url
|
||||
if detail_url
|
||||
.trim_end_matches('/')
|
||||
.rsplit('/')
|
||||
.next()
|
||||
.unwrap_or_default()
|
||||
.to_string();
|
||||
if slug.is_empty() {
|
||||
.is_empty()
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
items.push(ListStub {
|
||||
slug,
|
||||
detail_url,
|
||||
title,
|
||||
thumb,
|
||||
@@ -812,7 +809,6 @@ impl Pornhd3xProvider {
|
||||
fn parse_detail_metadata(&self, html: &str) -> Result<DetailMetadata> {
|
||||
let document = Html::parse_document(html);
|
||||
let title_selector = Self::selector(".mvic-desc h3")?;
|
||||
let description_selector = Self::selector("meta[name=\"description\"]")?;
|
||||
let og_image_selector = Self::selector("meta[property=\"og:image\"]")?;
|
||||
let studio_selector = Self::selector("#bread a[href*=\"/studio/\"]")?;
|
||||
let category_selector = Self::selector(".mvici-left a[href*=\"/category/\"]")?;
|
||||
@@ -826,13 +822,6 @@ impl Pornhd3xProvider {
|
||||
.map(|value| Self::text_of(&value))
|
||||
.filter(|value| !value.is_empty());
|
||||
|
||||
let description = document
|
||||
.select(&description_selector)
|
||||
.next()
|
||||
.and_then(|value| value.value().attr("content"))
|
||||
.map(Self::decode_html)
|
||||
.filter(|value| !value.is_empty());
|
||||
|
||||
let thumb = document
|
||||
.select(&og_image_selector)
|
||||
.next()
|
||||
@@ -886,7 +875,6 @@ impl Pornhd3xProvider {
|
||||
Ok(DetailMetadata {
|
||||
uploaded_at: title.as_deref().and_then(Self::parse_uploaded_at),
|
||||
title,
|
||||
description,
|
||||
thumb,
|
||||
studio,
|
||||
categories,
|
||||
|
||||
Reference in New Issue
Block a user