Crates.io | olx |
lib.rs | olx |
version | 0.1.2 |
source | src |
created_at | 2023-11-24 10:21:40.118343 |
updated_at | 2023-11-25 23:13:19.964893 |
description | A Rust library for extracting product information from OLX (www.olx.bg). |
homepage | https://github.com/ilovethensa/olx-scraper#readme |
repository | https://github.com/ilovethensa/olx-scraper |
max_upload_size | |
id | 1046936 |
size | 55,354 |
OLX Scraper is a Rust library for extracting product information from OLX (www.olx.bg). It provides functionalities for searching products within a specified price range and retrieving details about individual items using their URLs. Additionally, an optional command-line tool is included for convenient usage.
Add the following to your Cargo.toml
file:
[dependencies]
olx-scraper = "0.1"
use olx_scraper::search;
search::new("laptop", Some("elektronika/kompyutri/laptopi"), Some("500".to_string()), Some("1000".to_string()), Some("5"));
// Process the 'items' vector as needed
olx-scraper search -q <query> [-m <min_price>] [-x <max_price>] [-p <end_page>] [ -c <category>]
olx-scraper get --url <item_url>
Search for Laptops Priced between $500 and $1000 in the category laptops
olx-scraper search -q laptop -m 500 -x 1000 -c elektronika/kompyutri/laptopi
Get Details of a Specific Item
olx-scraper get --url https://www.olx.bg/item/example-item