Compare commits
4 Commits
javalsai-c
...
351439034e
Author | SHA1 | Date | |
---|---|---|---|
351439034e | |||
fe3c399c1d
|
|||
|
89830d6e1e | ||
1b5608b014 |
6
Cargo.lock
generated
6
Cargo.lock
generated
@@ -1039,7 +1039,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "r34-scraper"
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"clap",
|
||||
@@ -1329,9 +1329,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.79"
|
||||
version = "2.0.82"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590"
|
||||
checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@@ -26,11 +26,7 @@ async fn main() -> ExitCode {
|
||||
.unwrap();
|
||||
|
||||
for page in args.page - 1.. {
|
||||
println!("now scraping page {}", page + 1);
|
||||
println!(
|
||||
"https://rule34.xxx/index.php?page=post&s=list&tags={uri_tags}&pid={}",
|
||||
page * 42
|
||||
);
|
||||
println!("now scraping page {} (https://rule34.xxx/index.php?page=post&s=list&tags={uri_tags}&pid={})", page + 1, page * 42);
|
||||
|
||||
let post_html = async |client: &Client| {
|
||||
extract_urls(
|
||||
@@ -81,7 +77,7 @@ async fn main() -> ExitCode {
|
||||
async move {
|
||||
// "thread"
|
||||
loop {
|
||||
this_bar.set_message(format!("\x1b[37m[{i: >4}/{urls_amount}] \x1b[36mscraping {url:?}\x1b[0m"));
|
||||
this_bar.set_message(format!("\x1b[37m[{i: >4}/{urls_amount}] \x1b[36mscraping {url}\x1b[0m"));
|
||||
let resp = client.get(&url).send().await.unwrap();
|
||||
if let Ok(img_url) = extract_img_url(&resp.text().await.unwrap()) {
|
||||
if img_url.is_empty() {
|
||||
|
Reference in New Issue
Block a user