| Crates.io | dlsite |
| lib.rs | dlsite |
| version | 0.2.0 |
| created_at | 2023-05-22 11:53:48.034654+00 |
| updated_at | 2024-12-23 17:00:11.970334+00 |
| description | DLsite client |
| homepage | |
| repository | https://github.com/ozonezone/dlsite-rs |
| max_upload_size | |
| id | 870611 |
| size | 152,035 |
This is a library to get information about products on DLsite. Some information is not available on the HTML page, so this library also makes requests to the AJAX API.
NOTE: This library is still wip, and the API may change. Also, only the parts I needed are implemented, so there are many unimplemented parts.
use dlsite::{DlsiteClient, product::Product};
use tokio;
#[tokio::main]
async fn main() {
let client = DlsiteClient::default();
let product = client.get_product_api("RJ01014447").await.unwrap();
assert_eq!(product.creators.unwrap().voice_by.unwrap()[0].name, "佐倉綾音");
}
use dlsite::{DlsiteClient, product::Product, search::options::*};
use tokio;
#[tokio::main]
async fn main() {
let client = DlsiteClient::default();
let product = client
.search_product(&ProductSearchOptions {
sex_category: Some(vec![SexCategory::Male]),
keyword: Some("ASMR".to_string()),
..Default::default()
})
.await
.expect("Failed to search");
dbg!(&product);
}