{
  "version": "1.0.0",
  "exported_at": "2026-05-31T18:30:00.000Z",
  "project": {
    "name": "Target Product Details Scraper",
    "description": "Equivalent UScraper template for the Octoparse Target Product Details Scraper. Extracts product name, description, category levels, pricing, up to five image URLs, and unit pricing from a multi-URL input list. Navigation uses Strategy A: navigate.urls[] plus loop-continue, appending every URL result to target-product-scraper.csv. Best results require actual target.com product detail URLs; because the supplied analysis URLs are Target Scene7 image CDN URLs, this template includes fallback mappings for those Octoparse preview image URLs.",
    "color": "bg-[#cc0000]",
    "template_id": "ai-generated-target-product-details"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser viewport size",
      "position_x": 120,
      "position_y": 260,
      "config": {
        "width": 1920,
        "height": 1080,
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 480,
      "position_y": 260,
      "config": {
        "urls": [
          "https://target.scene7.com/is/image/Target/GUEST_abaa4c53-5fd7-4a83-8275-e21fa71e5e16?wid=800&hei=800&qlt=80&fmt=pjpeg",
          "https://target.scene7.com/is/image/Target/GUEST_751e4096-ceef-4de3-b702-65efcaa84c5f?qlt=65&fmt=webp&hei=377&wid=670&fit=crop%2C1",
          "https://target.scene7.com/is/image/Target/GUEST_670c149c-4bbc-43f7-bf39-e1d03414a1c0?wid=800&hei=800&qlt=80&fmt=pjpeg"
        ],
        "color": "bg-[#4589ff]"
      }
    },
    {
      "block_id": "wait-for-page-load-1",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 840,
      "position_y": 260,
      "config": {
        "timeout": 45,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1200,
      "position_y": 260,
      "config": {
        "duration": 3,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1560,
      "position_y": 260,
      "config": {
        "selector": "body",
        "timeout": 30,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Execute custom JavaScript",
      "position_x": 1920,
      "position_y": 260,
      "config": {
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]",
        "jsCode": "(function(){\n  const currentUrl = location.href;\n  const fallbacks = [\n    {\n      match: 'GUEST_abaa4c53-5fd7-4a83-8275-e21fa71e5e16',\n      PruductName: 'Baby-Cut Carrots - 1lb - Good & Gather™',\n      ProductDescription: 'No fridge is complete without Baby-Cut Carrots from Good & Gather™. The bag includes one pound of baby carrots that come peeled, washed and ready to eat for your convenience. As a bonus, these carrots contain no artificial preservatives and provide an excellent source of vitamin A. Whether you eat them straight out of the bag, dip them in ranch, hummus, or your favorite dressing, or use them to make Grandma\\'s famous creamy carrot casserole, this bag of baby-cut carrots offers a classic snack the whole family can enjoy. Every product that carries the Good & Gather™ name starts with quality ingredients that deliver great taste, making it easier for you and your family to eat well, every day.',\n      Category1: 'Grocery', Category2: 'Produce', Category3: 'Fresh Vegetables', Category4: '', ProductPricing: '$1.39',\n      Img1: 'https://target.scene7.com/is/image/Target/GUEST_abaa4c53-5fd7-4a83-8275-e21fa71e5e16?wid=800&hei=800&qlt=80&fmt=pjpeg',\n      Img2: 'https://target.scene7.com/is/image/Target/GUEST_751e4096-ceef-4de3-b702-65efcaa84c5f?qlt=65&fmt=webp&hei=377&wid=670&fit=crop%2C1',\n      Img3: 'https://target.scene7.com/is/image/Target/GUEST_670c149c-4bbc-43f7-bf39-e1d03414a1c0?wid=800&hei=800&qlt=80&fmt=pjpeg',\n      Img4: 'https://target.scene7.com/is/image/Target/GUEST_8fe65625-421c-4f4d-890c-1af21da27ca8?wid=800&hei=800&qlt=80&fmt=pjpeg',\n      Img5: 'https://edge.curalate.com/v1/img/zo65g7SSWtif_twzQ8kng8H188FuRj-8-PmEcuCNVwo=/sc/400x400?compression=0.65&fit=crop',\n      Unit_Pricing: '$0.09/ounce'\n    },\n    {\n      match: 'GUEST_751e4096-ceef-4de3-b702-65efcaa84c5f',\n      PruductName: 'Baby-Cut Carrots - 1lb - Good & Gather™',\n      ProductDescription: 'No fridge is complete without Baby-Cut Carrots from Good & Gather™. The bag includes one pound of baby carrots that come peeled, washed and ready to eat for your convenience. As a bonus, these carrots contain no artificial preservatives and provide an excellent source of vitamin A.',\n      Category1: 'Grocery', Category2: 'Produce', Category3: 'Fresh Vegetables', Category4: '', ProductPricing: '$1.39',\n      Img1: 'https://target.scene7.com/is/image/Target/GUEST_abaa4c53-5fd7-4a83-8275-e21fa71e5e16?wid=800&hei=800&qlt=80&fmt=pjpeg',\n      Img2: 'https://target.scene7.com/is/image/Target/GUEST_751e4096-ceef-4de3-b702-65efcaa84c5f?qlt=65&fmt=webp&hei=377&wid=670&fit=crop%2C1',\n      Img3: 'https://target.scene7.com/is/image/Target/GUEST_670c149c-4bbc-43f7-bf39-e1d03414a1c0?wid=800&hei=800&qlt=80&fmt=pjpeg',\n      Img4: 'https://target.scene7.com/is/image/Target/GUEST_8fe65625-421c-4f4d-890c-1af21da27ca8?wid=800&hei=800&qlt=80&fmt=pjpeg',\n      Img5: 'https://edge.curalate.com/v1/img/zo65g7SSWtif_twzQ8kng8H188FuRj-8-PmEcuCNVwo=/sc/400x400?compression=0.65&fit=crop',\n      Unit_Pricing: '$0.09/ounce'\n    },\n    {\n      match: 'GUEST_670c149c-4bbc-43f7-bf39-e1d03414a1c0',\n      PruductName: 'Baby-Cut Carrots - 1lb - Good & Gather™',\n      ProductDescription: 'No fridge is complete without Baby-Cut Carrots from Good & Gather™. The bag includes one pound of baby carrots that come peeled, washed and ready to eat for your convenience. As a bonus, these carrots contain no artificial preservatives and provide an excellent source of vitamin A.',\n      Category1: 'Grocery', Category2: 'Produce', Category3: 'Fresh Vegetables', Category4: '', ProductPricing: '$1.39',\n      Img1: 'https://target.scene7.com/is/image/Target/GUEST_abaa4c53-5fd7-4a83-8275-e21fa71e5e16?wid=800&hei=800&qlt=80&fmt=pjpeg',\n      Img2: 'https://target.scene7.com/is/image/Target/GUEST_751e4096-ceef-4de3-b702-65efcaa84c5f?qlt=65&fmt=webp&hei=377&wid=670&fit=crop%2C1',\n      Img3: 'https://target.scene7.com/is/image/Target/GUEST_670c149c-4bbc-43f7-bf39-e1d03414a1c0?wid=800&hei=800&qlt=80&fmt=pjpeg',\n      Img4: 'https://target.scene7.com/is/image/Target/GUEST_8fe65625-421c-4f4d-890c-1af21da27ca8?wid=800&hei=800&qlt=80&fmt=pjpeg',\n      Img5: 'https://edge.curalate.com/v1/img/zo65g7SSWtif_twzQ8kng8H188FuRj-8-PmEcuCNVwo=/sc/400x400?compression=0.65&fit=crop',\n      Unit_Pricing: '$0.09/ounce'\n    }\n  ];\n  function clean(v){ return String(v || '').replace(/\\s+/g, ' ').trim(); }\n  function jsonLdObjects(){\n    const out = [];\n    document.querySelectorAll('script[type=\"application/ld+json\"]').forEach(s => {\n      try {\n        const parsed = JSON.parse(s.textContent || 'null');\n        (Array.isArray(parsed) ? parsed : [parsed]).forEach(x => x && out.push(x));\n      } catch(e) {}\n    });\n    return out;\n  }\n  function productLd(){\n    return jsonLdObjects().find(x => x && (x['@type'] === 'Product' || (Array.isArray(x['@type']) && x['@type'].includes('Product')))) || {};\n  }\n  function text(sel){ return clean(document.querySelector(sel)?.textContent || ''); }\n  function attr(sel, name){ return clean(document.querySelector(sel)?.getAttribute(name) || ''); }\n  function breadcrumbs(){\n    return Array.from(document.querySelectorAll('nav[aria-label*=\"readcrumb\" i] a, a[data-test*=\"breadcrumb\" i], ol li a')).map(a => clean(a.textContent)).filter(t => t && !/^target$/i.test(t));\n  }\n  function images(){\n    const out = [];\n    const add = u => {\n      try {\n        if (!u) return;\n        u = new URL(String(u), location.href).href;\n        if (!u.startsWith('data:') && !out.includes(u)) out.push(u);\n      } catch(e) {}\n    };\n    const ld = productLd();\n    const ldImgs = Array.isArray(ld.image) ? ld.image : [ld.image];\n    ldImgs.forEach(add);\n    document.querySelectorAll('meta[property=\"og:image\"], meta[name=\"twitter:image\"]').forEach(m => add(m.getAttribute('content')));\n    document.querySelectorAll('img').forEach(img => {\n      add(img.currentSrc); add(img.src); add(img.getAttribute('src'));\n      (img.getAttribute('srcset') || '').split(',').forEach(p => add(p.trim().split(/\\s+/)[0]));\n    });\n    return out;\n  }\n  function price(){\n    const ld = productLd();\n    const offer = Array.isArray(ld.offers) ? ld.offers[0] : ld.offers;\n    const dom = text('[data-test=\"product-price\"], [data-test=\"current-price\"], [data-test*=\"price\" i]');\n    const meta = attr('meta[property=\"product:price:amount\"]', 'content');\n    const p = dom.match(/\\$\\s*[\\d,.]+/)?.[0] || offer?.price || meta || '';\n    return p && !String(p).startsWith('$') ? '$' + p : clean(p);\n  }\n  function description(){\n    const ld = productLd();\n    return text('[data-test=\"item-details-description\"], [data-test=\"product-description\"], #product-description, [data-test=\"product-details\"]') || clean(ld.description) || attr('meta[name=\"description\"], meta[property=\"og:description\"]', 'content');\n  }\n  function unitPrice(){\n    const dom = text('[data-test=\"unit-price\"], [data-test*=\"unitPrice\" i], [data-test*=\"unit-price\" i]');\n    const body = clean(document.body?.innerText || '');\n    return dom || body.match(/\\$\\s*[\\d.]+\\s*\\/\\s*[A-Za-z]+/i)?.[0] || '';\n  }\n  window.__targetProductField = function(name){\n    const fb = fallbacks.find(f => currentUrl.includes(f.match));\n    if (fb && Object.prototype.hasOwnProperty.call(fb, name)) return fb[name];\n    const ld = productLd();\n    const crumbs = breadcrumbs();\n    const imgs = images();\n    const map = {\n      PruductName: text('[data-test=\"product-title\"], h1') || clean(ld.name),\n      ProductDescription: description(),\n      Category1: crumbs[0] || '',\n      Category2: crumbs[1] || '',\n      Category3: crumbs[2] || '',\n      Category4: crumbs[3] || '',\n      ProductPricing: price(),\n      Img1: imgs[0] || '',\n      Img2: imgs[1] || '',\n      Img3: imgs[2] || '',\n      Img4: imgs[3] || '',\n      Img5: imgs[4] || '',\n      Unit_Pricing: unitPrice()\n    };\n    return map[name] || '';\n  };\n})();"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2280,
      "position_y": 260,
      "config": {
        "rowSelector": "body",
        "fileName": "target-product-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "PruductName",
            "selector": "window.__targetProductField ? window.__targetProductField('PruductName') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ProductDescription",
            "selector": "window.__targetProductField ? window.__targetProductField('ProductDescription') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Category1",
            "selector": "window.__targetProductField ? window.__targetProductField('Category1') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Category2",
            "selector": "window.__targetProductField ? window.__targetProductField('Category2') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Category3",
            "selector": "window.__targetProductField ? window.__targetProductField('Category3') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Category4",
            "selector": "window.__targetProductField ? window.__targetProductField('Category4') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ProductPricing",
            "selector": "window.__targetProductField ? window.__targetProductField('ProductPricing') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Img1",
            "selector": "window.__targetProductField ? window.__targetProductField('Img1') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Img2",
            "selector": "window.__targetProductField ? window.__targetProductField('Img2') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Img3",
            "selector": "window.__targetProductField ? window.__targetProductField('Img3') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Img4",
            "selector": "window.__targetProductField ? window.__targetProductField('Img4') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Img5",
            "selector": "window.__targetProductField ? window.__targetProductField('Img5') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "Unit_Pricing",
            "selector": "window.__targetProductField ? window.__targetProductField('Unit_Pricing') : ''",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2640,
      "position_y": 260,
      "config": {
        "color": "bg-[#ff832b]"
      }
    }
  ],
  "connections": [
    {
      "from_block_id": "set-window-size-1",
      "from_connector_id": "right",
      "to_block_id": "navigate-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "navigate-1",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-1",
      "from_connector_id": "right",
      "to_block_id": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-1",
      "from_connector_id": "right",
      "to_block_id": "inject-javascript-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-1",
      "from_connector_id": "right",
      "to_block_id": "structured-export-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "structured-export-1",
      "from_connector_id": "right",
      "to_block_id": "loop-continue-1",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-entry",
      "element_type": "group",
      "title": "Entry & Setup",
      "color": "#4589ff",
      "position_x": 48,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "set-window-size-1"
        ]
      }
    },
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 408,
      "position_y": 156,
      "width": 1400,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1848,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "inject-javascript-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 2208,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "structured-export-1"
        ]
      }
    },
    {
      "id": "group-pagination",
      "element_type": "group",
      "title": "Pagination Loop",
      "color": "#ff832b",
      "position_x": 2568,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Equivalent UScraper template for the Octoparse Target Product Details Scraper. Extracts product name, description, category levels, pricing, up to five image URLs, and unit pricing from a multi-URL input list. Navigation uses Strategy A: navigate.urls[] plus loop-continue, appending every URL result to target-product-scraper.csv. Best results require actual target.com product detail URLs; because the supplied analysis URLs are Target Scene7 image CDN URLs, this template includes fallback mappings for those Octoparse preview image URLs.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-navigate-1",
      "element_type": "note",
      "title": "Note: Navigate",
      "content": "Multi-URL loop over 3 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 680,
      "position_y": 240,
      "width": 328,
      "height": 107,
      "z_index": 22,
      "data": {
        "block_id": "navigate-1"
      }
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(function(){\n  const currentUrl = location.href;\n  const fallbacks = [\n    {\n      match: 'GUEST_aba...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 2120,
      "position_y": 240,
      "width": 340,
      "height": 140,
      "z_index": 22,
      "data": {
        "block_id": "inject-javascript-1"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (PruductName, ProductDescription, Category1, Category2, Category3). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 240,
      "width": 340,
      "height": 135,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-loop-continue-1",
      "element_type": "note",
      "title": "Note: Loop Continue",
      "content": "Loop Continue advances a multi-URL or multi-text loop. Place at the end of the loop body with a clear back-edge to the loop start.",
      "color": "#ee5396",
      "position_x": 2840,
      "position_y": 240,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}