CLI Tools for Scraping Products from Tokopedia.
Once you have Rust installed, you can use Cargo, Rust's package manager and build system, to install and run Scrapedia.
To run Scroost, run the following command in your terminal:
- Clone the repository:
git clone https://github.com/putnug1122/scroost
- Change directory to the project folder:
cd scroost
- Build and install the CLI app using Cargo:
cargo run -- [OPTIONS]
Options:
-q, --query Product keyword [default: Samsung]
-p, --page Number of pages to scrape [default: 1]
-f, --format Output format [default: json]
-h, --help Display this help message
-v, --version Display version information
cargo run -- -q iphone
[
{
"product_name": "IBOX Apple iPhone 15 Pro 128GB 256GB 512GB 1TB Blue Natural Titanium",
"rating": "5.0",
"store_name": "Studio Ponsel",
"store_location": "Jakarta Pusat",
"purchase_amount": "500+ terjual",
"discount_info": "16%",
"product_image_url": "https://images.tokopedia.net/img/cache/200-square/VqbcmM/2023/10/27/0c56f8cc-e374-4e8a-a691-88a398c7c3d9.jpg"
},
{
"product_name": "iPhone 14 Garansi Resmi",
"rating": "5.0",
"store_name": "igoods gadget",
"store_location": "Jakarta Barat",
"purchase_amount": "750+ terjual",
"discount_info": "17%",
"product_image_url": "https://images.tokopedia.net/img/cache/200-square/VqbcmM/2023/8/25/a6326dd1-8334-4fd7-821a-5ace01e12c2e.png"
}
]