< 返回版块

zTgx 发表于 2025-07-11 10:49

Quick start

use dotenv::dotenv;
use std::env;
use xplore::Xplore;

#[tokio::main]
async fn main() {
    dotenv().ok();

    let mut xplore = Xplore::new(None).await.unwrap();

    let cookie = env::var("X_COOKIE_STRING").expect("X_COOKIE_STRING");
    xplore.set_cookie(&cookie).await;

    let screen_name = "elonmusk"; // Replace with the desired screen name
    println!("Getting profile for: {screen_name}");
    let profile = xplore.get_profile(screen_name).await.expect("Failed to get profile");
    println!("Profile: {profile:#?}");
}

Ext Link: https://github.com/zTgx/xplore

评论区

写评论
whereiszebra 2025-07-11 22:21

延迟高吗

1 共 1 条评论, 1 页