javalsai-changes #6

Merged
danmax merged 9 commits from javalsai-changes into main 2024-10-19 21:39:41 +02:00
2 changed files with 3 additions and 4 deletions
Showing only changes of commit 4acaf0308c - Show all commits

2
rust-toolchain.toml Normal file
View File

@ -0,0 +1,2 @@
[toolchain]
channel = "nightly"

View File

@ -21,7 +21,6 @@ async fn main() -> ExitCode {
let mut page = 0;
loop {
println!("now scraping page {}", page + 1);
let post_html = async || {
@ -45,11 +44,10 @@ async fn main() -> ExitCode {
let mut wait_time = 5000;
if urls.is_empty() {
for reconnection_attempts in 0..4 {
println!("no urls found, retrying in {} seconds...", wait_time / 1000);
sleep(Duration::from_millis(wait_time)).await;
urls = post_html().await;
if !urls.is_empty() {
@ -67,7 +65,6 @@ async fn main() -> ExitCode {
}
for url in urls {
let img_url =
extract_img_url(&client.get(url).send().await.unwrap().text().await.unwrap());
if img_url.is_empty() {