7 stable releases
new 3.0.2 | Dec 7, 2024 |
---|---|
3.0.1 | Dec 6, 2024 |
3.0.0 | Oct 25, 2024 |
2.0.0 | Oct 18, 2024 |
1.1.1 | Oct 18, 2024 |
#125 in Video
234 downloads per month
30KB
555 lines
pf_lib
A Rust library to retrieve WordPress MP4 videos. Supports filtering by date and including/excluding specific IDs, categories, and tags.
Example
use pf_lib::{FinderConfig, FinderTarget};
let config = FinderConfig {
url: "http://example.com".to_string(),
target: FinderTarget::Media,
..Default::default()
};
for url in pf_lib::find(&config) {
println!("{}", url);
}
lib.rs
:
This library provides functionality to find and fetch existing video URLs from a WordPress website.
The main components of this library are:
api
: Handles interactions with the paginated WordPress API.config
: Defines configuration options for theFinder
.finder
: Implements the logic to find and fetch existing video URLs.link_utils
: Utility functions for handling links.mime_types
: Defines supported MIME types for scraping.url_extractor
: Functions to extract URLs from WordPress API responses.
Dependencies
~7–19MB
~251K SLoC