javtiful fix
This commit is contained in:
@@ -151,7 +151,7 @@ impl JavtifulProvider {
|
|||||||
};
|
};
|
||||||
if page > 1
|
if page > 1
|
||||||
&& !text.contains(&format!(
|
&& !text.contains(&format!(
|
||||||
"<a class=\"front-pagination-link is-active\" href=\"/videos\" aria-current=\"page\">{}</a>",
|
"aria-current=\"page\">{}</a>",
|
||||||
page
|
page
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
@@ -219,7 +219,7 @@ impl JavtifulProvider {
|
|||||||
};
|
};
|
||||||
if page > 1
|
if page > 1
|
||||||
&& !text.contains(&format!(
|
&& !text.contains(&format!(
|
||||||
"<a class=\"front-pagination-link is-active\" href=\"/videos\" aria-current=\"page\">{}</a>",
|
"aria-current=\"page\">{}</a>",
|
||||||
page
|
page
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
@@ -361,7 +361,7 @@ impl JavtifulProvider {
|
|||||||
None => "".to_string(),
|
None => "".to_string(),
|
||||||
};
|
};
|
||||||
let mut preview = seg
|
let mut preview = seg
|
||||||
.split("data-trailer=\"")
|
.split("data-front-video-preview-src=\"")
|
||||||
.nth(1)
|
.nth(1)
|
||||||
.and_then(|s| s.split('"').next())
|
.and_then(|s| s.split('"').next())
|
||||||
.unwrap_or("")
|
.unwrap_or("")
|
||||||
@@ -403,7 +403,8 @@ impl JavtifulProvider {
|
|||||||
.split("related-actress")
|
.split("related-actress")
|
||||||
.next()
|
.next()
|
||||||
.and_then(|s| s.split("video-comments").next())
|
.and_then(|s| s.split("video-comments").next())
|
||||||
.and_then(|s| s.split(">Tags<").nth(1))
|
.and_then(|s| s.split(">Tags").nth(1))
|
||||||
|
.and_then(|s| s.split("</div>").next())
|
||||||
.map(|tag_block| {
|
.map(|tag_block| {
|
||||||
tag_block
|
tag_block
|
||||||
.split("<a ")
|
.split("<a ")
|
||||||
@@ -433,10 +434,10 @@ impl JavtifulProvider {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
let views = text
|
let views = text
|
||||||
.split(" Views ")
|
.split(" views</span>")
|
||||||
.next()
|
.next()
|
||||||
.and_then(|s| s.split(" ").last())
|
.and_then(|s| s.split('>').last())
|
||||||
.and_then(|s| s.replace(".", "").parse::<u32>().ok())
|
.and_then(|s| s.trim().replace(".", "").replace(",", "").parse::<u32>().ok())
|
||||||
.unwrap_or(0);
|
.unwrap_or(0);
|
||||||
|
|
||||||
Ok((tags, views))
|
Ok((tags, views))
|
||||||
|
|||||||
@@ -164,7 +164,6 @@ impl Requester {
|
|||||||
fn looks_like_cloudflare_challenge(body: &str) -> bool {
|
fn looks_like_cloudflare_challenge(body: &str) -> bool {
|
||||||
body.contains("Just a moment...")
|
body.contains("Just a moment...")
|
||||||
|| body.contains("cf-turnstile-response")
|
|| body.contains("cf-turnstile-response")
|
||||||
|| body.contains("challenges.cloudflare.com")
|
|
||||||
|| body.contains("Enable JavaScript and cookies to continue")
|
|| body.contains("Enable JavaScript and cookies to continue")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user