Skallwar / suckit

Suck the InTernet
Apache License 2.0
733 stars 38 forks source link

panicked at 'called `Option::unwrap()` on a `None` #109

Open cacaxiforyou opened 3 years ago

cacaxiforyou commented 3 years ago

I downloaded the latest release version, The version does not seem to be updated to 0.1.1.

:~/csuckit# ./suckit -V
suckit 0.1.0

When I use it, errors occur most of the time. I don't know rust well, the program is great, I hope to get help.

RUST_BACKTRACE=1 ./suckit https://www.bing.com -v -j 8 -u "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" -t 2 -e ".*.png"
~/csuckit# RUST_BACKTRACE=1 ./suckit https://www.bing.com -v -j 8 -u "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" -t 2 -e ".*.png"
2021-01-08 11:17:33.851524278 +08:00: [INFO] Visited: https://www.bing.com/
2021-01-08 11:17:33.888791557 +08:00: [INFO] Visited: https://www.bing.com/th?id=OHR.FoucaultsPendulum_ZH-CN9435794626_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp
2021-01-08 11:17:33.952818147 +08:00: [INFO] Visited: https://www.bing.com/sa/simg/hpc27.png
2021-01-08 11:17:34.013390032 +08:00: [INFO] Visited: https://www.bing.com/rs/16/Z/cj,nj/SaARcujqfMTKslsX8RYX1fR5N7Q.js
2021-01-08 11:17:34.063275272 +08:00: [INFO] Visited: https://www.bing.com/rs/16/24/cj,nj/Dm21B_RK98kel_AmFzx_vVUxyA8.js
2021-01-08 11:17:34.178764453 +08:00: [INFO] Visited: https://www.bing.com/dict?FORM=Z9LH3
2021-01-08 11:17:34.181435859 +08:00: [INFO] Visited: https://www.bing.com/sa/simg/favicon-2x.ico
2021-01-08 11:17:34.186635845 +08:00: [INFO] Visited: https://www.bing.com/rs/16/27/cj,nj/HeslkHjv6jsQPEIfhz5LxGWUBHI.js
2021-01-08 11:17:34.191187684 +08:00: [INFO] Visited: https://www.bing.com/rs/16/2e/cj,nj/r55v7gxWDwkhcrGBcy9GDN-1JO8.js
2021-01-08 11:17:34.241397473 +08:00: [INFO] Visited: https://www.bing.com/maps?FORM=Z9LH4
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/scraper.rs:216:59
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:50:5
   3: suckit::scraper::Scraper::handle_url
   4: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:215:60
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::handle_url
   4: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/scraper.rs:68:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::map_url_path
   4: suckit::scraper::Scraper::handle_url
   5: core::ops::function::FnOnce::call_once{{vtable.shim}}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any', src/scraper.rs:285:10
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
   1: core::panicking::panic_fmt
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1268:5
   3: suckit::scraper::Scraper::run
   4: suckit::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
CohenArthur commented 3 years ago

I downloaded the latest release version, The version does not seem to be updated to 0.1.1.

:~/csuckit# ./suckit -V
suckit 0.1.0

Sorry about that, you did get the 0.1.1 release, it's just that the code's version specified in the file Cargo.toml wasn't updated :sweat_smile: You can create a PR for it if you want, or I'll update it

CohenArthur commented 3 years ago

I'm going to check the error you encountered. You're trying to download anything but PNG pictures from bing?

Like0x commented 3 years ago

I'm going to check the error you encountered. You're trying to download anything but PNG pictures from bing?

Yes! . In fact, I want to do download some resources,such as html/js/css .But not image resources. I used bing for testing. I encountered this panic on many sites.

Skallwar commented 3 years ago

There are lot of issues right now that needs to be fixed before tackling this one. I will notify you when I will start working on this, but I can't give you a time frame, SuckIT is a side project for me for the time being.

Like0x commented 3 years ago

There are lot of issues right now that needs to be fixed before tackling this one. I will notify you when I will start working on this, but I can't give you a time frame, SuckIT is a side project for me for the time being.

Thank :)