title: scraping product title and url with axios
body: <p>This is code I got from a youtube tutorial originally for scraping news from news site.</p>
  <pre><code>    const PORT = process.env.PORT || 8000
  const express = require('express')
  const axios = require('axios')
  const cheerio = require('cheerio')
  const app = express()
  
  
  const categories = [
      {
          name: 'jamtangan',
          address: 'https://www.blibli.com/c/2/aksesoris-jam-tangan/AK-1000005/JA-1000225',
          base: ''
      }
  ]
  
  const products = []
  
  categories.forEach(category =&gt; {
      axios.get(category.address)
          .then(response =&gt; {
              const html = response.data
              const $ = cheerio.load(html)
  
              $('a:contains(&quot;jam&quot;)', html).each(function () {
                  const title = $(this).text()
                  const url = $(this).attr('href')
  
                  products.push({
                      title,
                      url: category.base + url,
                      source: category.name
                  })
              })
  
          })
  })
  
  
  
  
  app.get('/', (req, res) =&gt; {
      res.json('Welcome to my Climate Change News API')
  })
  
  app.get('/products', (req, res) =&gt; {
      res.json(products)
  })
  </code></pre>
  <p>How do I modify this get request so I can get a list of product names and it's url which contain the string &quot;jam&quot; from url listed in <strong>categories</strong> :</p>
  <pre><code>&lt;div data-v-016547a4=&quot;&quot; tabindex=&quot;0&quot; class=&quot;product__item&quot;&gt;&lt;a data-v-016547a4=&quot;&quot; href=&quot;/p/baterai-maxell-lr44-baterai-kancing-maxel-jam-cts-99-kf909b-kalkulator/ps--LUO-70001-00038?ds=LUO-70001-00038-00001&amp;amp;source=CATEGORY&amp;amp;sid=cf162d5637763f56&amp;amp;cnc=false&amp;amp;pickupPointCode=PP-3137527&amp;amp;pid=LUO-70001-00038&quot; class=&quot;&quot; target=&quot;_blank&quot;&gt;&lt;div data-v-016547a4=&quot;&quot; class=&quot;product__item-container&quot;&gt;&lt;div data-v-016547a4=&quot;&quot; class=&quot;product__image&quot;&gt;&lt;div data-v-016547a4=&quot;&quot; class=&quot;product__tags&quot;&gt;&lt;div data-v-016547a4=&quot;&quot;&gt;&lt;!----&gt;&lt;/div&gt;&lt;/div&gt; &lt;div data-v-016547a4=&quot;&quot; class=&quot;product__wishlist&quot;&gt;&lt;i data-v-016547a4=&quot;&quot; class=&quot;bli-wishlist-icon&quot;&gt;&lt;/i&gt;&lt;/div&gt; &lt;div data-v-016547a4=&quot;&quot; id=&quot;PRODUCT_IMAGE_LUO-70001-00038&quot; class=&quot;product__image-color product__image-color__gridview&quot;&gt;&lt;div data-v-016547a4=&quot;&quot; class=&quot;product__itemImage product__image__grid-view&quot;&gt;&lt;img data-v-016547a4=&quot;&quot; title=&quot;Baterai Maxell LR44 baterai kancing Maxel jam CTS-99 KF909B kalkulator&quot; src=&quot;https://www.static-src.com/wcsstore/Indraprastha/images/catalog/medium//97/MTA-7927225/maxell_baterai_maxell_lr44_baterai_kancing_maxel_jam_cts-99_kf909b_kalkulator_full01_qrfnk13y.jpg&quot; alt=&quot;Baterai Maxell LR44 baterai kancing Maxel jam CTS-99 KF909B kalkulator&quot;&gt;&lt;/div&gt; &lt;!----&gt; &lt;div data-v-016547a4=&quot;&quot; class=&quot;product__color&quot;&gt;&lt;div data-v-2ecbe0a1=&quot;&quot; data-v-016547a4=&quot;&quot; class=&quot;attribute&quot;&gt;&lt;!----&gt; &lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;!----&gt;&lt;/div&gt; &lt;div data-v-016547a4=&quot;&quot; class=&quot;product__description&quot;&gt;&lt;div data-v-016547a4=&quot;&quot; class=&quot;product__content&quot;&gt;&lt;!----&gt; &lt;!----&gt; &lt;div data-v-016547a4=&quot;&quot; title=&quot;Baterai Maxell LR44 baterai kancing Maxel jam CTS-99 KF909B kalkulator&quot; class=&quot;product__title&quot;&gt;
              Baterai Maxell LR44 baterai kancing Maxel jam CTS-99 KF909B kalkulator
          &lt;/div&gt; &lt;div data-v-016547a4=&quot;&quot; class=&quot;product__body&quot;&gt;&lt;p data-v-016547a4=&quot;&quot; class=&quot;product__body__price&quot;&gt;&lt;strong data-v-016547a4=&quot;&quot; class=&quot;product__body__price__display&quot;&gt;
                Rp1.500
                &lt;!----&gt;&lt;/strong&gt; &lt;span data-v-016547a4=&quot;&quot; class=&quot;product__body__price__discount&quot;&gt;&lt;span data-v-016547a4=&quot;&quot; class=&quot;product__body__price__slashed&quot;&gt;Rp5.000&lt;/span&gt; &lt;span data-v-016547a4=&quot;&quot; class=&quot;product__body__price__slashed-percentage&quot;&gt;
                    70%
                  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;div data-v-016547a4=&quot;&quot; class=&quot;product__body__location_container&quot;&gt;&lt;!----&gt; &lt;img data-v-016547a4=&quot;&quot; src=&quot;https://www.static-src.com//siva/asset//11_2020/icon-top-rated-bronze.png&quot; alt=&quot;Bronze&quot; class=&quot;product__body__location_merchantIcon&quot;&gt; &lt;span data-v-016547a4=&quot;&quot; class=&quot;product__body__location&quot;&gt;&lt;!----&gt; &lt;span data-v-016547a4=&quot;&quot; class=&quot;product__body__location__text&quot;&gt;
                  Kab. Tangerang
                &lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div data-v-016547a4=&quot;&quot; class=&quot;product__body__rating&quot;&gt;&lt;div data-v-016547a4=&quot;&quot; class=&quot;product__body__rating__stars seperator&quot;&gt;&lt;img data-v-016547a4=&quot;&quot; src=&quot;data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPHBhdGggZD0iTTAgMEgxNlYxNkgweiIvPgogICAgICAgIDxwYXRoIGZpbGw9IiNGREI4MTMiIGZpbGwtcnVsZT0ibm9uemVybyIgZD0iTTguOTM1IDEuNjQ5bDEuMjYxIDIuNjU5Yy4yMS40Mi42My43IDEuMDUxLjg0bDIuODAzLjQyYy45MS4wNyAxLjI2IDEuMjYuNjMgMS44ODlsLTIuMDMyIDIuMWMtLjM1LjM1LS40Mi44NC0uNDIgMS4yNmwuNDIgMi44NjhjLjIxLjkxLS43NyAxLjYxLTEuNjExIDEuMTlsLTIuNTIzLTEuMzNjLS40Mi0uMjEtLjkxLS4yMS0xLjMzIDBsLTIuNTIzIDEuMzNjLS43Ny40Mi0xLjc1Mi0uMjgtMS42MTItMS4xOWwuNDktMi44NjljLjA3LS40Mi0uMDctLjkxLS40Mi0xLjI2TDEuMzY4IDcuMzg3Yy0uNzAxLS42My0uMzUtMS43NS42My0xLjg5bDIuODAzLS40MmMuMzUtLjE0Ljg0LS40Mi45OC0uOTFMNy4wNDQgMS41MWMuMzUtLjcgMS41NDItLjcgMS44OTIuMTR6Ii8+CiAgICA8L2c+Cjwvc3ZnPgo=&quot; alt=&quot;rating icon&quot; class=&quot;product__body__rating__stars__icon&quot;&gt; &lt;span data-v-016547a4=&quot;&quot; class=&quot;product__body__rating__stars__rating&quot;&gt;4.3&lt;/span&gt; &lt;span data-v-016547a4=&quot;&quot; class=&quot;product__body__rating__stars__count&quot;&gt;(13)&lt;/span&gt;&lt;/div&gt; &lt;div data-v-016547a4=&quot;&quot; class=&quot;product__body__rating__sold&quot;&gt;&lt;span data-v-016547a4=&quot;&quot; class=&quot;product__body__rating__sold__count&quot;&gt;Terjual 363&lt;/span&gt;&lt;/div&gt;&lt;/div&gt; &lt;div data-v-016547a4=&quot;&quot; class=&quot;product__body__rating__badge-gridView&quot;&gt;&lt;!----&gt; &lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;!----&gt;&lt;/div&gt;&lt;/div&gt;&lt;/a&gt; &lt;div data-v-016547a4=&quot;&quot; class=&quot;product__add-to-cart-section&quot;&gt;&lt;button data-v-016547a4=&quot;&quot; class=&quot;product__body__button&quot;&gt;Tambah ke Bag&lt;/button&gt;&lt;/div&gt; &lt;!----&gt;&lt;/div&gt;
  </code></pre>