<commit_before>const axios = require('axios');
const cheerio = require('cheerio');
const throat = require('throat');
const helpers = require('../helpers');

async function work(type, page = 1) {

  await helpers.delayScrape('https://www.solelyoutdoors.com')
  console.log(`loading solely outdoors ${page}`)

  return axios.get(`https://www.solelyoutdoors.com/ammunition/${type}/page${page}.html`)
    .then(r => {
      let $ = cheerio.load(r.data)
      const items = [];
      $('.product').each((index, row) => {
        const result = {};
        const tha = $(row);


        result.link = tha.find('.image-wrap a').prop('href');
        result.img = tha.find('.image-wrap img').prop('src');
        result.name = tha.find('.image-wrap a').prop('title').trim();
        const priceTxt = tha.find('.info .left').text();
        result.price = parseFloat(priceTxt.replace('C$', ''));
        result.vendor = 'Soley Outdoors';
        result.province = 'ON'

        items.push(result);
      })

      if ($('.next.enabled').length) {
        $ = null; // dont hold onto page for recursion<commit_msg>disabled soley outdoors pagination since not working<commit_after>const axios = require('axios');
const cheerio = require('cheerio');
const throat = require('throat');
const helpers = require('../helpers');

async function work(type, page = 1) {

  await helpers.delayScrape('https://www.solelyoutdoors.com')
  console.log(`loading solely outdoors ${page}`)

  return axios.get(`https://www.solelyoutdoors.com/ammunition/${type}/page${page}.html`)
    .then(r => {
      let $ = cheerio.load(r.data)
      const items = [];
      $('.product').each((index, row) => {
        const result = {};
        const tha = $(row);


        result.link = tha.find('.image-wrap a').prop('href');
        result.img = tha.find('.image-wrap img').prop('src');
        result.name = tha.find('.image-wrap a').prop('title').trim();
        const priceTxt = tha.find('.info .left').text();
        result.price = parseFloat(priceTxt.replace('C$', ''));
        result.vendor = 'Soley Outdoors';
        result.province = 'ON'

        items.push(result);
      })

      // having redirect problem, disabled pulling other pages for now
      if (1 > 2 && $('.next.enabled').length) {
        $ = null; // dont hold onto page for recursion
{'fraction_non_alphanumeric': 0.18822518263859045, 'fraction_numerical': 0.0017189514396218307, 'mean_word_length': 2.899497487437186, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1337326', 'n_tokens_mistral': 733, 'n_tokens_neox': 709, 'n_words': 150}