| Crates.io | prehrajto-core |
| lib.rs | prehrajto-core |
| version | 0.1.0 |
| created_at | 2025-12-26 18:56:48.648973+00 |
| updated_at | 2025-12-26 18:56:48.648973+00 |
| description | Core scraping library for prehraj.to |
| homepage | |
| repository | https://github.com/xdkid1337/prehrajto-scraper |
| max_upload_size | |
| id | 2006098 |
| size | 107,466 |
Async Rust library for searching videos and getting download links from prehraj.to.
[dependencies]
prehrajto-core = "0.1"
tokio = { version = "1", features = ["full"] }
use prehrajto_core::{PrehrajtoScraper, Result};
#[tokio::main]
async fn main() -> Result<()> {
let scraper = PrehrajtoScraper::new()?;
// Search for videos
let results = scraper.search("doctor who").await?;
for video in results {
println!("{}", video.name);
println!(" Duration: {:?}", video.duration);
println!(" Size: {:?}", video.file_size);
println!(" Download: {}", video.download_url);
}
Ok(())
}
Customize the HTTP client behavior:
use prehrajto_core::{PrehrajtoScraper, ClientConfig};
let config = ClientConfig {
requests_per_second: 1.0, // Max requests per second
timeout_secs: 60, // Request timeout
max_retries: 5, // Retry attempts on failure
};
let scraper = PrehrajtoScraper::with_config(config)?;
| Field | Type | Description |
|---|---|---|
name |
String |
Video title |
url |
String |
Video page URL |
video_id |
String |
Unique video ID |
video_slug |
String |
URL-friendly slug |
download_url |
String |
Direct download link |
duration |
Option<String> |
Duration (HH:MM:SS) |
quality |
Option<String> |
Quality (e.g., "HD") |
file_size |
Option<String> |
File size |
MIT
This project is provided for educational and research purposes only.
According to prehraj.to Terms of Service (Articles 7.5 and 7.6), automated requests to their servers are prohibited. By using this library, you acknowledge that:
Use at your own risk.