feat: extract Kijiji scraping logic into reusable function

This commit extracts the Kijiji scraping functionality into a reusable function `fetchKijijiItems`. This allows for easier integration into other parts of the application and improves code modularity. The function accepts search query, requests per second, and base URL as parameters, enabling customizable scraping.
This commit is contained in:
2025-09-17 22:03:24 -04:00
parent b7a61423c3
commit 46a8ac92cf
2 changed files with 32 additions and 17 deletions

View File

@@ -0,0 +1,6 @@
import fetchKijijiItems from "./kijiji";
const SEARCH_QUERY = "playstation 5";
const items = await fetchKijijiItems(SEARCH_QUERY);
console.log(items);