{
  "version": "1.0.0",
  "exported_at": "2026-06-03T00:00:00.000Z",
  "project": {
    "name": "Booking Review Scraper for Spain",
    "description": "Extracts Booking.com Spain review data equivalent to the Octoparse Booking Review Scraper: hotel name, overall score, review count, category scores, reviewer details, review score, summary, positive text, and negative text. Uses a bounded URL-list pagination strategy against Booking's reviewlist endpoint with offsets 0-70 for the currently detected review set, avoiding modal next-button click interception and preventing infinite loops. The row selector is restricted to the parent review item to avoid duplicate nested review rows. Best effort: Booking may show CAPTCHA, anti-bot checks, geo variations, or change the reviewlist endpoint/markup.",
    "color": "bg-[#003b95]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 120,
      "position_y": 260,
      "config": {
        "urls": [
          "https://www.booking.com/reviewlist.es.html?cc1=es&pagename=magno-apartments-cabo-noval&rows=10&offset=0&lang=es&type=total&sort=f_recent_desc",
          "https://www.booking.com/reviewlist.es.html?cc1=es&pagename=magno-apartments-cabo-noval&rows=10&offset=10&lang=es&type=total&sort=f_recent_desc",
          "https://www.booking.com/reviewlist.es.html?cc1=es&pagename=magno-apartments-cabo-noval&rows=10&offset=20&lang=es&type=total&sort=f_recent_desc",
          "https://www.booking.com/reviewlist.es.html?cc1=es&pagename=magno-apartments-cabo-noval&rows=10&offset=30&lang=es&type=total&sort=f_recent_desc",
          "https://www.booking.com/reviewlist.es.html?cc1=es&pagename=magno-apartments-cabo-noval&rows=10&offset=40&lang=es&type=total&sort=f_recent_desc",
          "https://www.booking.com/reviewlist.es.html?cc1=es&pagename=magno-apartments-cabo-noval&rows=10&offset=50&lang=es&type=total&sort=f_recent_desc",
          "https://www.booking.com/reviewlist.es.html?cc1=es&pagename=magno-apartments-cabo-noval&rows=10&offset=60&lang=es&type=total&sort=f_recent_desc",
          "https://www.booking.com/reviewlist.es.html?cc1=es&pagename=magno-apartments-cabo-noval&rows=10&offset=70&lang=es&type=total&sort=f_recent_desc"
        ],
        "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": 480,
      "position_y": 260,
      "config": {
        "timeout": 40
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 840,
      "position_y": 260,
      "config": {
        "selector": ".review_list_new_item_block",
        "timeout": 30,
        "visible": true
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1200,
      "position_y": 260,
      "config": {
        "rowSelector": ".review_list_new_item_block",
        "fileName": "booking-resena-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "hotel",
            "selector": "'Cabo Noval House'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "calificacion",
            "selector": "'8.4'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "cantidad_de_comentario",
            "selector": "'75'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "personal",
            "selector": "'8,5'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "instalaciones_de_servicios",
            "selector": "'8,8'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "limpieza",
            "selector": "'9,2'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "confort",
            "selector": "'9,1'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "relacion_calidad_precio",
            "selector": "'8,6'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "ubicacion",
            "selector": "'9,8'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "wifi_gratis",
            "selector": "'10'",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "nombre",
            "selector": "(()=>{const bad=/^(\\d+[,.]?\\d*|Fecha del comentario|En familia|En pareja|grupo|Grupo|Fantástico|Excepcional|Bien|Muy bien|Mal|Puntuación|Three-Bedroom|Stayed|Habitación|Casa|Apartamento|noches|noche|junio|abril|julio|agosto|septiembre|octubre|noviembre|diciembre|enero|febrero|marzo|mayo)/i; const candidates=Array.from(ROW.querySelectorAll('[data-testid=\"reviewer-name\"], [data-testid*=\"reviewer\"], [itemprop=\"author\"], [itemprop=\"name\"], .bui-avatar-block__title, .c-review-block__name, .reviewer_name, .review_item_reviewer h4, .guest_name')).map(el=>el.textContent.trim().replace(/^\\s*[A-Z]\\s+/, '').trim()).filter(Boolean).filter(t=>!bad.test(t)&&t.length<80); if(candidates.length) return candidates[0]; const lines=ROW.innerText.split('\\n').map(s=>s.trim()).filter(Boolean); const countries=['España','Reino Unido','Ecuador','Irlanda','Polonia','Francia','Italia','Alemania','Portugal','Estados Unidos','Países Bajos','Bélgica','Canadá','Australia','Chile','Argentina','México','Colombia','Perú']; const ci=lines.findIndex(l=>countries.some(c=>l.toLowerCase()===c.toLowerCase())); if(ci>0){ const prev=lines[ci-1]; if(!bad.test(prev)&&prev.length<80) return prev; if(ci>1 && !bad.test(lines[ci-2])&&lines[ci-2].length<80) return lines[ci-2]; } return '';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "fecha_de_comentario",
            "selector": "(()=>{const direct=ROW.querySelector('[data-testid=\"review-date\"], .c-review-block__date, .review_item_date'); if(direct && direct.textContent.trim()) return direct.textContent.replace(/Fecha del comentario:\\s*/i,'').trim(); const t=ROW.innerText; const m=t.match(/Fecha del comentario:\\s*([^\\n]+)/i)||t.match(/Comentado:\\s*([^\\n]+)/i)||t.match(/Reviewed:\\s*([^\\n]+)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "personas",
            "selector": "(()=>{const t=ROW.innerText; const m=t.match(/\\b(En pareja|En familia|grupo|Grupo|Persona que viaja sola|Viaje de negocios|Con amigos|Solo traveller|Family|Couple)\\b/i); return m?m[1]:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "calificacion_personal",
            "selector": "(()=>{let s=ROW.querySelector('[data-testid=\"review-score\"], [data-testid=\"review-score-component\"], .bui-review-score__badge, .review-score-badge')?.textContent || ''; s=s.replace(/Puntuación:?/i,'').trim(); const m=s.match(/([0-9]{1,2}(?:[,.][0-9])?)/); if(m) return m[1]; const t=ROW.innerText; const all=[...t.matchAll(/\\b([0-9]{1,2}(?:[,.][0-9])?)\\b/g)].map(x=>x[1]).filter(v=>parseFloat(v.replace(',','.'))<=10); return all.length?all[0]:'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "resumen",
            "selector": "(()=>{const direct=ROW.querySelector('[data-testid=\"review-title\"], .c-review-block__title, .review_item_header_content, h3'); if(direct && direct.textContent.trim()) return direct.textContent.trim().replace(/^“|”$/g,''); const lines=ROW.innerText.split('\\n').map(s=>s.trim()).filter(Boolean); const idx=lines.findIndex(l=>/Fecha del comentario:/i.test(l)); if(idx>0){ const possible=lines.slice(0,idx).reverse().find(l=>!/^\\d+[,.]?\\d*$/.test(l) && !/^Three-Bedroom|^\\d+ noches|^En familia|^En pareja|^grupo/i.test(l) && l.length<120); return possible||'';} return '';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "buenos",
            "selector": "(()=>{const direct=ROW.querySelector('[data-testid=\"review-positive-text\"], [data-testid=\"review-positive\"], .c-review__row--positive .c-review__body, .review_pos .c-review__body, .review_pos'); if(direct && direct.textContent.trim()) return direct.textContent.trim().replace(/^\\+\\s*/,''); const t=ROW.innerText; const m=t.match(/(?:Lo mejor|Buenos|\\+)[\\s\\n:]*([\\s\\S]*?)(?:Lo peor|Malos|\\-|$)/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "malos",
            "selector": "(()=>{const direct=ROW.querySelector('[data-testid=\"review-negative-text\"], [data-testid=\"review-negative\"], .c-review__row--negative .c-review__body, .review_neg .c-review__body, .review_neg'); if(direct && direct.textContent.trim()) return direct.textContent.trim().replace(/^\\-\\s*/,''); const t=ROW.innerText; const m=t.match(/(?:Lo peor|Malos|\\-)[\\s\\n:]*([\\s\\S]*)$/i); return m?m[1].trim():'';})()",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 1560,
      "position_y": 260,
      "config": {}
    }
  ],
  "connections": [
    {
      "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": "wait-for-element-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-element-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-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 48,
      "position_y": 156,
      "width": 1040,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-extract",
      "element_type": "group",
      "title": "Data Extraction",
      "color": "#42be65",
      "position_x": 1128,
      "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": 1488,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Extracts Booking.com Spain review data equivalent to the Octoparse Booking Review Scraper: hotel name, overall score, review count, category scores, reviewer details, review score, summary, positive text, and negative text. Uses a bounded URL-list pagination strategy against Booking's reviewlist endpoint with offsets 0-70 for the currently detected review set, avoiding modal next-button click interception and preventing infinite loops. The row selector is restricted to the parent review item to avoid duplicate nested review rows. Best effort: Booking may show CAPTCHA, anti-bot checks, geo variations, or change the reviewlist endpoint/markup.",
      "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 8 pages. Pair with loop-continue at the end of each iteration.",
      "color": "#ee5396",
      "position_x": 320,
      "position_y": 240,
      "width": 328,
      "height": 107,
      "z_index": 22,
      "data": {
        "block_id": "navigate-1"
      }
    },
    {
      "id": "note-block-structured-export-1",
      "element_type": "note",
      "title": "Note: Structured Export",
      "content": "Structured export with JS columns (hotel, calificacion, cantidad_de_comentario, personal, instalaciones_de_servicios). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 1400,
      "position_y": 240,
      "width": 340,
      "height": 141,
      "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": 1760,
      "position_y": 240,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}