matsche
matsche on Hacker News
Posted by
matsche on Monday June 07, 2021 @07:23AM
from the show-hn dept.
Yes, you can either limit how many request can be send concurrently or enforce a fixed or random delay in between consecutive requests.
Basically this a just a futures_timer::Delay [0] that is reset after each request, which is non blocking.
[0] https://docs.rs/futures-timer/3.0.2/futures_timer/
Thanks, you're right. I fixed it just now by also requiring the tokio feature for all the tests in the Cargo.toml.
I haven't used scraper too much. I personally find the predicate approach of select.rs [0] easier to use. However in this case the selector approach just made more sense.
Standalone html5ever can be a bit cumbersome to work with directly, scraper is basically an implementation of the html5ever's `TreeSink` trait, where as `select.rs` uses the hmtl5ever `RcDom` to parse the document but stores it in a more convenient way. If you look for a minimal approach you should at select.rs which basicially only depends on html5ever
[0] https://github.com/utkarshkukreti/select.rs
Posted by
matsche on Wednesday December 30, 2020 @06:42AM
from the show-hn dept.
Unfortunately this crate has been abandoned by its author for quite some time now. The main differences are that are that chromiumoxide uses async rust by design and that all the devtools protocol types are generated.
rust-headless-chrome was very helpful for some parts and bootstrapped some parts of chromiumoxide, such as the key and mouse clicking. However I looked at chromedp and puppeteer itself for the most part.
It uses async-tungstenite [0] for the websocket part. At the moment configured only with async-std-runtime but since async-tungstenite also supports tokio, the option to use tokio instead of async-std will be added as well.
[0] https://github.com/sdroege/async-tungstenite
Posted by
matsche on Monday December 14, 2020 @07:35AM
from the show-hn dept.
Posted by
matsche on Saturday August 22, 2020 @03:13PM
from the show-hn dept.
it baffles me that it had to come this far. There were warning signs all over it.
The German BaFin messed up so badly that one must either fundamentally doubt theircompetence or question their integrity.