scrapfly-sdk 0.2.4

Async Rust client for the Scrapfly web scraping, screenshot, extraction and crawler APIs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Typed config builders for every Scrapfly endpoint.
//!
//! - `scrape` → query-param based (`to_query_pairs`)
//! - `screenshot` → query-param based
//! - `extraction` → JSON body + query params
//! - `crawler` → JSON body with bounds validation

pub mod crawler;
pub mod extraction;
pub mod scrape;
pub mod screenshot;

use base64::Engine;

/// URL-safe base64 without padding, matching `sdk/go/utils.go::urlSafeB64Encode`.
pub(crate) fn url_safe_b64_encode(data: &str) -> String {
    base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(data.as_bytes())
}