@@ -140,7 +140,7 @@ If we run the program now, we'll see 34 items in total. Some items don't have va
140140[
141141 ...
142142 {
143- "variant " : null ,
143+ "variantName " : null ,
144144 "url" : " https://warehouse-theme-metal.myshopify.com/products/klipsch-r-120sw-powerful-detailed-home-speaker-set-of-1" ,
145145 "title" : " Klipsch R-120SW Powerful Detailed Home Speaker - Unit" ,
146146 "minPrice" : 32400 ,
@@ -158,15 +158,15 @@ Some products will break into several items, each with a different variant name.
158158[
159159 ...
160160 {
161- "variant " : " Red - $178.00" ,
161+ "variantName " : " Red - $178.00" ,
162162 "url" : " https://warehouse-theme-metal.myshopify.com/products/sony-xb950-extra-bass-wireless-headphones-with-app-control" ,
163163 "title" : " Sony XB-950B1 Extra Bass Wireless Headphones with App Control" ,
164164 "minPrice" : 12800 ,
165165 "price" : null ,
166166 "vendor" : " Sony"
167167 },
168168 {
169- "variant " : " Black - $178.00" ,
169+ "variantName " : " Black - $178.00" ,
170170 "url" : " https://warehouse-theme-metal.myshopify.com/products/sony-xb950-extra-bass-wireless-headphones-with-app-control" ,
171171 "title" : " Sony XB-950B1 Extra Bass Wireless Headphones with App Control" ,
172172 "minPrice" : 12800 ,
@@ -184,7 +184,7 @@ Perhaps surprisingly, some products with variants will have the price field set.
184184[
185185 ...
186186 {
187- "variant " : " Red - $74.95" ,
187+ "variantName " : " Red - $74.95" ,
188188 "url" : " https://warehouse-theme-metal.myshopify.com/products/jbl-flip-4-waterproof-portable-bluetooth-speaker" ,
189189 "title" : " JBL Flip 4 Waterproof Portable Bluetooth Speaker" ,
190190 "minPrice" : 7495 ,
@@ -236,7 +236,7 @@ async function download(url) {
236236 }
237237}
238238
239- function parseProduct (productItem , baseURL ) {
239+ function parseProduct ($ productItem , baseURL ) {
240240 const $title = $productItem .find (" .product-item__title" );
241241 const title = $title .text ().trim ();
242242 const url = new URL ($title .attr (" href" ), baseURL).href ;
0 commit comments