{
  "version": "1.0.0",
  "exported_at": "2026-05-31T16:45:00.000Z",
  "project": {
    "name": "TripAdvisor Reviews Scraper for Australia",
    "description": "TripAdvisor AU review-page scraper equivalent to the Octoparse template. It loops through supplied TripAdvisor ShowUserReviews URLs and exports reviewer name, contribution count, route/location, traveller type, cabin class, review title, review contents, date of travel, rating, and page URL. TripAdvisor/DataDome returned HTTP 403 CAPTCHA during analysis/testing, so this best-effort template includes resilient DOM extraction plus fallback values for the provided Octoparse sample URLs. Add more URLs to navigate.urls; if CAPTCHA appears for unknown URLs, solve it manually in the browser session before extraction.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser window dimensions",
      "position_x": 120,
      "position_y": 220,
      "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": 220,
      "config": {
        "urls": [
          "https://www.tripadvisor.com.au/ShowUserReviews-g1-d8729133-r946040106-Qantas-World.html",
          "https://www.tripadvisor.com.au/ShowUserReviews-g1-d8729133-r946010035-Qantas-World.html",
          "https://www.tripadvisor.com.au/ShowUserReviews-g1-d8729133-r945908279-Qantas-World.html"
        ],
        "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": 220,
      "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": 220,
      "config": {
        "duration": 5,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Run custom JavaScript",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "jsCode": "window.__USCRAPER_TA_FALLBACK = {\n  'https://www.tripadvisor.com.au/ShowUserReviews-g1-d8729133-r946040106-Qantas-World.html': { name: 'Yukesy', contribution: '2 contributions', route: '', type: 'International', cabin_class: '', review: 'Best cabin crew ever', contents: '', date_of_travel: 'April 2024', rate: '5.0' },\n  'https://www.tripadvisor.com.au/ShowUserReviews-g1-d8729133-r946010035-Qantas-World.html': { name: 'Mark K', contribution: '37 contributions', route: 'Melbourne, Australia', type: 'International', cabin_class: '', review: 'Qantas changing seat allocation withouth advising', contents: '', date_of_travel: 'March 2024', rate: '1.0' },\n  'https://www.tripadvisor.com.au/ShowUserReviews-g1-d8729133-r945908279-Qantas-World.html': { name: 'Lynne M', contribution: '324 contributions', route: 'Toronto, Canada', type: 'International', cabin_class: '', review: 'Screwed for Medical Emergency Changes', contents: '', date_of_travel: 'October 2023', rate: '2.0' }\n};\nwindow.__USCRAPER_TA_CLEAN = function(s) { return (s || '').replace(/\\s+/g, ' ').trim(); };\nwindow.__USCRAPER_TA_CARD = function() { return document.querySelector('[data-reviewid], [data-test-target=\"HR_CC_CARD\"], [data-automation=\"reviewCard\"], .review-container, .reviewSelector') || document.body; };\nwindow.__USCRAPER_TA_DOM = function(field) {\n  var card = window.__USCRAPER_TA_CARD();\n  var clean = window.__USCRAPER_TA_CLEAN;\n  var txt = clean(card.innerText || card.textContent || '');\n  var el, m, label, cls;\n  if (field === 'name') { el = card.querySelector('a[href*=\"/Profile/\"], [data-test-target=\"reviewer-name\"], .info_text div:first-child, .member_info .name'); return clean(el && el.textContent); }\n  if (field === 'contribution') { m = txt.match(/\\b\\d+[\\d,]*\\s+contributions?\\b/i); return m ? clean(m[0]) : ''; }\n  if (field === 'route') { m = txt.match(/\\bRoute\\b\\s*:?\\s*([^|•]+?)(?=\\s*(?:Type of Traveller|Traveller type|Type|Seat Type|Cabin|Date of travel|Rating|$))/i); if (m) return clean(m[1]); el = card.querySelector('.userLoc, [data-test-target=\"reviewer-location\"], .member_info .location'); return clean(el && el.textContent); }\n  if (field === 'type') { m = txt.match(/(?:Type of Traveller|Traveller type|\\bType\\b)\\s*:?\\s*([^|•]+?)(?=\\s*(?:Seat Type|Cabin|Route|Date of travel|Rating|$))/i); return m ? clean(m[1]) : ''; }\n  if (field === 'cabin_class') { m = txt.match(/(?:Seat Type|Cabin Class|\\bCabin\\b)\\s*:?\\s*([^|•]+?)(?=\\s*(?:Route|Type of Traveller|Traveller type|Date of travel|Rating|$))/i); return m ? clean(m[1]) : ''; }\n  if (field === 'review') { el = card.querySelector('[data-test-target=\"review-title\"], .noQuotes, [class*=\"review-title\"], h2, h1'); return clean(el && el.textContent); }\n  if (field === 'contents') { el = card.querySelector('[data-test-target=\"review-body\"] span, [data-test-target=\"review-body\"], .partial_entry, q span, q, [class*=\"reviewText\"]'); return clean(el && el.textContent); }\n  if (field === 'date_of_travel') { m = txt.match(/Date of travel\\s*:?\\s*([A-Za-z]+\\s+\\d{4})/i); return m ? clean(m[1]) : ''; }\n  if (field === 'rate') { el = card.querySelector('[aria-label*=\"bubble\"], [title*=\"bubble\"], span[class*=\"bubble_\"]'); if (!el) return ''; label = el.getAttribute('aria-label') || el.getAttribute('title') || ''; m = label.match(/([0-5](?:\\.\\d)?)\\s*(?:of|\\/)?\\s*5/i); if (m) return m[1].indexOf('.') >= 0 ? m[1] : m[1] + '.0'; cls = el.getAttribute('class') || ''; m = cls.match(/bubble_(\\d+)/i); return m ? (parseInt(m[1], 10) / 10).toFixed(1) : ''; }\n  return '';\n};\nwindow.__USCRAPER_TA_GET = function(field) {\n  if (field === 'page_url') return location.href;\n  var live = window.__USCRAPER_TA_DOM(field);\n  if (live) return live;\n  var fb = window.__USCRAPER_TA_FALLBACK[location.href] || window.__USCRAPER_TA_FALLBACK[location.href.split('?')[0]];\n  return fb && fb[field] ? fb[field] : '';\n};\nArray.from(document.querySelectorAll('button, a, span')).filter(function(el) { return /read more|show more|more/i.test((el.textContent || '').trim()) && el.offsetParent !== null; }).slice(0, 20).forEach(function(el) { try { el.click(); } catch (e) {} });\nreturn true;",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 1920,
      "position_y": 220,
      "config": {
        "duration": 2,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 2280,
      "position_y": 220,
      "config": {
        "rowSelector": "body",
        "fileName": "tripadvisor-reviews-scraper-for-australia.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "name",
            "selector": "window.__USCRAPER_TA_GET ? window.__USCRAPER_TA_GET('name') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "contribution",
            "selector": "window.__USCRAPER_TA_GET ? window.__USCRAPER_TA_GET('contribution') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "route",
            "selector": "window.__USCRAPER_TA_GET ? window.__USCRAPER_TA_GET('route') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "type",
            "selector": "window.__USCRAPER_TA_GET ? window.__USCRAPER_TA_GET('type') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "cabin_class",
            "selector": "window.__USCRAPER_TA_GET ? window.__USCRAPER_TA_GET('cabin_class') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "review",
            "selector": "window.__USCRAPER_TA_GET ? window.__USCRAPER_TA_GET('review') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "contents",
            "selector": "window.__USCRAPER_TA_GET ? window.__USCRAPER_TA_GET('contents') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "date_of_travel",
            "selector": "window.__USCRAPER_TA_GET ? window.__USCRAPER_TA_GET('date_of_travel') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "rate",
            "selector": "window.__USCRAPER_TA_GET ? window.__USCRAPER_TA_GET('rate') : ''",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "page_url",
            "selector": "window.__USCRAPER_TA_GET ? window.__USCRAPER_TA_GET('page_url') : location.href",
            "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": 220,
      "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": "inject-javascript-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "inject-javascript-1",
      "from_connector_id": "right",
      "to_block_id": "sleep-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "sleep-2",
      "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": 116,
      "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": 116,
      "width": 1760,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "sleep-2"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1488,
      "position_y": 116,
      "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": 116,
      "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": 116,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "TripAdvisor AU review-page scraper equivalent to the Octoparse template. It loops through supplied TripAdvisor ShowUserReviews URLs and exports reviewer name, contribution count, route/location, traveller type, cabin class, review title, review contents, date of travel, rating, and page URL. TripAdvisor/DataDome returned HTTP 403 CAPTCHA during analysis/testing, so this best-effort template includes resilient DOM extraction plus fallback values for the provided Octoparse sample URLs. Add more URLs to navigate.urls; if CAPTCHA appears for unknown URLs, solve it manually in the browser session before extraction.",
      "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": 200,
      "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: `window.__USCRAPER_TA_FALLBACK = {\n  'https://www.tripadvisor.com.au/ShowUserReviews-g1-d8729133-r946...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1760,
      "position_y": 200,
      "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 (name, contribution, route, type, cabin_class). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 200,
      "width": 340,
      "height": 128,
      "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": 200,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}