Skip to content

Getting started and unable to run first example #271

@smolattack

Description

@smolattack

Is there a getting started guide I could use? I looked in the examples folder but these don't seem to be complete projects. Quite new to Rust so not sure how to get started. I tried to make a project to run the first example in the readme but immediately got an error.

cargo run
   Compiling scraper-wiki v0.1.0 (~/code/scraper-wiki)
error[E0599]: no function or associated item named `rustls` found for struct `ClientBuilder` in the current scope
   --> src/main.rs:12:28
    |
12  |     let c = ClientBuilder::rustls()
    |                            ^^^^^^ function or associated item not found in `ClientBuilder<_>`
    |
note: if you're trying to build a new `ClientBuilder<_>` consider using one of the following associated functions:
      ClientBuilder::<hyper_tls::client::HttpsConnector<hyper_util::client::legacy::connect::http::HttpConnector>>::native
      ClientBuilder::<C>::new
   --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fantoccini-0.21.1/src/lib.rs:198:5
    |
198 |     pub fn native() -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^
...
207 |     pub fn new(connector: C) -> Self {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0599`.
error: could not compile `scraper-wiki` (bin "scraper-wiki") due to 1 previous error

Cargo.toml

[package]
name = "scraper-wiki"
version = "0.1.0"
edition = "2021"

[dependencies]
fantoccini = "0.21.1"
tokio = { version = "1.39.3", features = ["rt-multi-thread", "macros"] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions