fix: remove hash check to refetch on failure
This commit is contained in:
parent
6f5e732bc8
commit
fc791412a5
1 changed files with 4 additions and 4 deletions
|
|
@ -166,12 +166,12 @@ pub async fn fetch(session: &str, last_hash: &str) -> (Vec<Colle>, String) {
|
||||||
|
|
||||||
// Extract text using pdf_extract
|
// Extract text using pdf_extract
|
||||||
let pdf_text = pdf_extract::extract_text(tmpfile.path()).expect("Failed to extract PDF text");
|
let pdf_text = pdf_extract::extract_text(tmpfile.path()).expect("Failed to extract PDF text");
|
||||||
println!("{}", pdf_text);
|
|
||||||
// Calculate the hash of the PDF file
|
// Calculate the hash of the PDF file
|
||||||
let hash = hash_text(&pdf_text);
|
let hash = hash_text(&pdf_text);
|
||||||
if hash == last_hash || pdf_text.contains("Aucune colle") {
|
// if hash == last_hash || pdf_text.contains("Aucune colle") {
|
||||||
return (Vec::new(), hash);
|
// return (Vec::new(), hash);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Split the text into lines and filter out empty lines
|
// Split the text into lines and filter out empty lines
|
||||||
let lines: Vec<&str> = pdf_text
|
let lines: Vec<&str> = pdf_text
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue