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