Add an admin based table dump and change buy_it_now_price to cents
All checks were successful
Cargo Build & Test / Rust project - latest (1.86) (push) Successful in 3m32s
Cargo Build & Test / Rust project - latest (1.87) (push) Successful in 3m57s
Cargo Build & Test / Rust project - latest (1.88) (push) Successful in 4m2s
Cargo Build & Test / Rust project - latest (1.85.1) (push) Successful in 9m17s
All checks were successful
Cargo Build & Test / Rust project - latest (1.86) (push) Successful in 3m32s
Cargo Build & Test / Rust project - latest (1.87) (push) Successful in 3m57s
Cargo Build & Test / Rust project - latest (1.88) (push) Successful in 4m2s
Cargo Build & Test / Rust project - latest (1.85.1) (push) Successful in 9m17s
This commit is contained in:
@@ -154,7 +154,7 @@ pub fn extract_data_from_html(
|
||||
title,
|
||||
id: 0,
|
||||
item_id: id?,
|
||||
buy_it_now_price: final_buy_it_now_price,
|
||||
buy_it_now_price_cents: final_buy_it_now_price.map(|b| (b * 100.0).round() as i64),
|
||||
has_best_offer,
|
||||
image_url,
|
||||
},
|
||||
@@ -177,7 +177,7 @@ mod tests {
|
||||
#[test_log::test]
|
||||
fn parse() {
|
||||
let timestamp = chrono::DateTime::from_timestamp(1750369463, 0).unwrap();
|
||||
let html = include_str!("../test_data/ebay_scraper/raw_scraped/ssd/1750369463.html");
|
||||
let html = include_str!("../test_data/scraper/raw_scraped/ssd/1750369463.html");
|
||||
let parsed = extract_data_from_html(html, ×tamp, "ssd").unwrap();
|
||||
// assert_eq!(parsed.len(), 62);
|
||||
|
||||
@@ -189,7 +189,7 @@ mod tests {
|
||||
id: 0,
|
||||
item_id: 388484391867,
|
||||
title: "WD Blue 2.5-Inch 3D NAND SATA SSD 1TB - WDBNCE0010PNC-WRSN".to_string(),
|
||||
buy_it_now_price: Some(59.99),
|
||||
buy_it_now_price_cents: Some(5999),
|
||||
has_best_offer: true,
|
||||
image_url: "https://i.ebayimg.com/images/g/wQYAAeSwOTtoN8SC/s-l500.webp"
|
||||
.to_string()
|
||||
@@ -210,7 +210,7 @@ mod tests {
|
||||
title:
|
||||
"Fanxiang M.2 SSD 1TB NVMe PCIe Gen 3x 4 M2 Internal Solid State Drive 3500MB/s"
|
||||
.to_string(),
|
||||
buy_it_now_price: None,
|
||||
buy_it_now_price_cents: None,
|
||||
has_best_offer: true,
|
||||
image_url: "https://i.ebayimg.com/images/g/3NoAAeSwPrtoDb1O/s-l500.webp"
|
||||
.to_string()
|
||||
|
Reference in New Issue
Block a user