async function scrapeContainerPage(url, colour = 'yellow') {
  const weapons = {
    white: [],
    lightBlue: [],
    blue: [],
    purple: [],
    pink: [],
    red: [],
    yellow: [],
  };

  console.log(`Scraping container at ${url}`);

  // Load page into Cheerio
  const html = await _getHtml(url);
  const $ = cheerio.load(html);

  await _extractWeaponData($, weapons, colour);

  return weapons;
}
/**
 * Extract all weapons from container at the provided URL.
 * If the provided colour is not yellow, knives/gloves data will not be returned.
 * @param {string} url - URL to scrape
 * @param {string} [colour=yellow] - colour of weapon we are interested in
 * @returns {Promise<import('../typedefs/container').ContainerData>} weapons in container
 */
Extract all weapons from container at the provided URL.
If the provided colour is not yellow, knives/gloves data will not be returned.
@param {string} url - URL to scrape
@param {string} [colour=yellow] - colour of weapon we are interested in
@returns {Promise} weapons in container
Extract all weapons from container at the provided URL . If the provided colour is not yellow knives / gloves data will not be returned . @param { string } url - URL to scrape @param { string } [ colour = yellow ] - colour of weapon we are interested in @returns { Promise } weapons in container
async function scrapeContainerPage(url, colour = 'yellow') {
  const weapons = {
    white: [],
    lightBlue: [],
    blue: [],
    purple: [],
    pink: [],
    red: [],
    yellow: [],
  };
  console.log(`Scraping container at ${url}`);
  const html = await _getHtml(url);
  const $ = cheerio.load(html);
  await _extractWeaponData($, weapons, colour);
  return weapons;
}
async function scrapeContainerPage ( url , colour = 'yellow' ) { const weapons = { white : [ ] , lightBlue : [ ] , blue : [ ] , purple : [ ] , pink : [ ] , red : [ ] , yellow : [ ] , } ; console . log ( ` ${ url } ` ) ; const html = await _getHtml ( url ) ; const $ = cheerio . load ( html ) ; await _extractWeaponData ( $ , weapons , colour ) ; return weapons ; }
Extract all weapons from container at the provided URL.
Extract all weapons from container at the provided URL .
// Load page into Cheerio