string[] Array containing all matched results
Iterates through the selector and tries to find an element or a selector in the first given selector and returns the result as an array
any[]
Example:
collectOnAttributeAndElement($, ".results--grid", "a", "href", baseUrl)
// => will return an array containing all relative links in the href attribute that live in a
It iterates over all matching results based on the selector and returns an Array containg the texts.
string[] Array containing all matched results
Splits a string from whitespace and replaces "," with ".". Used for some online shops.
string
Returns only unique values from an Array. Used mostly with the filter array method as a callback function.
Fetches the website content and convert its content into text.
Promise<cheerio.CheerioAPI>
Example:
const $ = await requestWebsite("https://www.amazon.de/s?k=", "airpods")
// => will return cheerio API Object to work with.
$(".prices").each((_, value) => {
console.log($(value).text().trim());
});
Scrapes MediaMarkt for products based on your search query
ISearchResult[]
Splices an array content based on the given start and endpositions. Returns the original mutated array.
string[]
Example:
const testArray = ["one", "two", "three"]
spliceArray(testArray, 0, 2)
// => ["three"]
spliceArray(testArray, testArray.length - 2, 2)
// => ["one"]
Generated using TypeDoc
It iterates over the selector and returns an array containing the content of the attribute that was provided.