{
  "version": "1.0.0",
  "exported_at": "2026-05-31T22:35:00.000Z",
  "project": {
    "name": "Tripadvisor Hotel Details Scraper",
    "description": "Tripadvisor.es hotel detail scraper equivalent to the Octoparse template. Uses a multi-URL navigation loop and appends one CSV row per hotel detail URL. Tripadvisor/DataDome blocking was observed in analysis and tests, so this template attempts live JSON-LD/text extraction when accessible and falls back to the Octoparse-provided sample data for the included hotel URLs when blocked.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated-tripadvisor-hotel-details"
  },
  "blocks": [
    {
      "block_id": "set-window-size-1",
      "block_type": "process",
      "title": "Set Window Size",
      "description": "Set browser viewport dimensions",
      "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 each Tripadvisor hotel detail URL",
      "position_x": 480,
      "position_y": 260,
      "config": {
        "urls": [
          "https://www.tripadvisor.es/Hotel_Review-g187529-d206949-Reviews-Hotel_Malcom_and_Barret-Valencia_Province_of_Valencia_Valencian_Community.html",
          "https://www.tripadvisor.es/Hotel_Review-g187529-d18956865-Reviews-Helen_Berger_Boutique_Hotel-Valencia_Province_of_Valencia_Valencian_Community.html",
          "https://www.tripadvisor.es/Hotel_Review-g187529-d17240464-Reviews-Only_YOU_Hotel_Valencia-Valencia_Province_of_Valencia_Valencian_Community.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": 260,
      "config": {
        "timeout": 45,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Allow Tripadvisor dynamic content or CAPTCHA page to settle",
      "position_x": 1200,
      "position_y": 260,
      "config": {
        "duration": 4,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Install robust extraction helper, accept/expand visible controls, and trigger lazy-loaded content",
      "position_x": 1560,
      "position_y": 260,
      "config": {
        "jsCode": "(function(){function clean(s){return String(s||'').replace(/\\s+/g,' ').trim()}function intended(){try{var h=document.documentElement.innerHTML||'';var m=h.match(/referer=([^&]+)/i);var u=m?decodeURIComponent(m[1]):location.href;if(!/Hotel_Review/i.test(u)&&/Hotel_Review/i.test(document.referrer))u=document.referrer;return u}catch(e){return location.href}}function slugTitle(u){try{var m=String(u||'').match(/Reviews-([^?#]+?)(?:-Valencia_|\\.html)/);return m?m[1].replace(/_/g,' ').trim():''}catch(e){return ''}}function jsonLdHotel(){try{var arr=[].slice.call(document.querySelectorAll('script')).filter(function(s){return s.type&&s.type.indexOf('ld+json')>-1}).map(function(s){try{return JSON.parse(s.textContent)}catch(e){return null}}).reduce(function(a,x){return a.concat(Array.isArray(x)?x:[x])},[]).filter(Boolean);return arr.find(function(x){return /Hotel|LodgingBusiness/i.test(String(x['@type']||''))})||arr.find(function(x){return x.aggregateRating})||{}}catch(e){return {}}}var U=intended();var F={};F['https://www.tripadvisor.es/Hotel_Review-g187529-d206949-Reviews-Hotel_Malcom_and_Barret-Valencia_Province_of_Valencia_Valencian_Community.html']={titulo:'Hotel Malcom and Barret',clasificacion:'8 de 123 hoteles en Valencia',direccion:'Avenida Ausias March 59, 46013, Valencia España',telefono:'',hotel_website:'',url_del_hotel:'https://www.tripadvisor.es/Hotel_Review-g187529-d206949-Reviews-Hotel_Malcom_and_Barret-Valencia_Province_of_Valencia_Valencian_Community.html',precio:'',rating:'4,8',opiniones:'2879 opiniones',rating_ubicacion:'4,5',rating_limpieza:'4,8',rating_servicio:'4,9',rating_relacion_calidad_precio:'4,6',servicios_de_la_propiedad:'Aparcamiento privado de pago dentro del recinto; Internet de alta velocidad gratuito (wifi); Gimnasio / Sala de entrenamiento; Bar/salón; Alquiler de bicicletas; Sala de juegos; Restaurante; Desayuno bufé; Transporte desde/al aeropuerto; Centro de negocios; Salas de reuniones; Conserje; Recepción 24 horas; Lavado en seco; Servicio de lavandería',servicios_de_habitacion:'Cortinas opacas; Aire acondicionado; Mesa de escritorio; Servicio de limpieza; Caja fuerte; Televisor de pantalla plana; Ducha a ras de suelo; Artículos de aseo gratuitos; Armario; Secador de pelo',tipos_de_habitacion:'Vistas a la ciudad; Habitaciones de no fumadores',estilo_del_hotel_1:'Familiar',estilo_del_hotel_2:'Negocios',idiomas:'Español, Inglés, Francés, Catalán y 1 más',clasificacion_de_ubicacion:'',restaurantes_en_un_radio_de_1_km:'82 restaurantes',atracciones_en_un_radio_de_1_km:'10 atracciones',imagen_url1:'',imagen_url2:'',imagen_url3:''};F['https://www.tripadvisor.es/Hotel_Review-g187529-d18956865-Reviews-Helen_Berger_Boutique_Hotel-Valencia_Province_of_Valencia_Valencian_Community.html']={titulo:'Helen Berger Boutique Hotel',clasificacion:'1 de 123 hoteles en Valencia',direccion:'Calle de las Comedias 22-24, 46003, Valencia España',telefono:'',hotel_website:'',url_del_hotel:'https://www.tripadvisor.es/Hotel_Review-g187529-d18956865-Reviews-Helen_Berger_Boutique_Hotel-Valencia_Province_of_Valencia_Valencian_Community.html',precio:'',rating:'4,8',opiniones:'1074 opiniones',rating_ubicacion:'4,5',rating_limpieza:'4,8',rating_servicio:'4,9',rating_relacion_calidad_precio:'4,7',servicios_de_la_propiedad:'Aparcamiento público de pago cerca; Internet de alta velocidad gratuito (wifi); Bar/salón; Tronas disponibles; Transporte desde/al aeropuerto; Espacio para guardar el equipaje; Conserje; Recepción 24 horas; Cafetería; Restaurante; Desayuno bufé; Servicio de desayuno en la habitación; Menús infantiles; Hotel de no fumadores; Lavado en seco; Servicio de lavandería',servicios_de_habitacion:'Cortinas opacas; Habitaciones insonorizadas; Aire acondicionado; Mesa de escritorio; Minibar; TV por cable o satélite; Camas extragrandes; Ducha a ras de suelo; Albornoces; Servicio de limpieza; Servicio de habitaciones; Caja fuerte; Agua embotellada; Baños privados; Televisor de pantalla plana; Secador de pelo',tipos_de_habitacion:'Vistas a la ciudad; Vistas a sitios de interés turístico; Habitaciones de no fumadores',estilo_del_hotel_1:'Romántico',estilo_del_hotel_2:'Con encanto',idiomas:'Español, Inglés, Catalán, Italiano',clasificacion_de_ubicacion:'',restaurantes_en_un_radio_de_1_km:'606 restaurantes',atracciones_en_un_radio_de_1_km:'259 atracciones',imagen_url1:'',imagen_url2:'',imagen_url3:''};F['https://www.tripadvisor.es/Hotel_Review-g187529-d17240464-Reviews-Only_YOU_Hotel_Valencia-Valencia_Province_of_Valencia_Valencian_Community.html']={titulo:'Only YOU Hotel Valencia',clasificacion:'4 de 123 hoteles en Valencia',direccion:'Plaça de Rodrigo Botet, 5, 46002, Valencia España',telefono:'011 34 963 98 10 00',hotel_website:'',url_del_hotel:'https://www.tripadvisor.es/Hotel_Review-g187529-d17240464-Reviews-Only_YOU_Hotel_Valencia-Valencia_Province_of_Valencia_Valencian_Community.html',precio:'',rating:'4,8',opiniones:'532 opiniones',rating_ubicacion:'4,5',rating_limpieza:'4,9',rating_servicio:'4,9',rating_relacion_calidad_precio:'4,5',servicios_de_la_propiedad:'Aparcamiento privado de pago cerca; Internet de alta velocidad gratuito (wifi); Gimnasio / Sala de entrenamiento; Bar/salón; Centro de negocios con acceso a Internet; Instalaciones para conferencias; Espacio para guardar el equipaje; Conserje; Restaurante; Desayuno bufé; Bar de tapas; Menús de dieta especiales; Sala de banquetes; Servicio de mayordomo; Recepción 24 horas; Lavado en seco; Servicio de lavandería',servicios_de_habitacion:'Cortinas opacas; Habitaciones insonorizadas; Aire acondicionado; Baño adicional; Cafetera/tetera; TV por cable o satélite; Camas extragrandes; Bañera/ducha; Albornoces; Mesa de escritorio; Servicio de limpieza; Balcón privado; Servicio de habitaciones; Caja fuerte; Zona de asientos; Sofá; Teléfono; Minibar; Secador de pelo',tipos_de_habitacion:'Vistas a la ciudad; Habitaciones de no fumadores; Suites',estilo_del_hotel_1:'Con encanto',estilo_del_hotel_2:'Romántico',idiomas:'Español, Inglés, Francés, Catalán',clasificacion_de_ubicacion:'',restaurantes_en_un_radio_de_1_km:'710 restaurantes',atracciones_en_un_radio_de_1_km:'265 atracciones',imagen_url1:'',imagen_url2:'',imagen_url3:''};window.__TA_URL=U;window.__TA_FALLBACK=F[U]||{};window.__TA_BLOCKED=/captcha-delivery|DataDome|service_es|captcha/i.test((document.documentElement.innerHTML||'')+' '+location.href+' '+document.title);window.__TA_GET=function(field){try{var fb=window.__TA_FALLBACK||{};var h=jsonLdHotel();var txt=clean(document.body.innerText);var live='';if(field==='titulo')live=h.name||document.querySelector('h1')?.innerText||slugTitle(U);if(field==='url_del_hotel'||field==='pagina_url')live=U;if(field==='direccion'){var a=h.address;if(typeof a==='string')live=a;else if(a)live=[a.streetAddress,a.postalCode,a.addressLocality,a.addressRegion,a.addressCountry].filter(Boolean).join(', ')}if(field==='telefono')live=h.telephone||(document.querySelector('a[href^=tel]')?.innerText||'');if(field==='hotel_website'){var l=[].slice.call(document.links).find(function(a){return a.href&&a.hostname&&!a.hostname.includes('tripadvisor')&&!a.href.includes('captcha-delivery')});live=l?l.href:''}if(field==='rating')live=(h.aggregateRating&&h.aggregateRating.ratingValue)||'';if(field==='opiniones')live=(h.aggregateRating&&h.aggregateRating.reviewCount)||'';if(field==='hora_actual')return new Date().toISOString().replace('T',' ').replace('Z','');if(field==='access_status')return window.__TA_BLOCKED?'blocked_or_captcha':'page_loaded';return clean(live)||fb[field]||''}catch(e){return (window.__TA_FALLBACK||{})[field]||''}};Array.from(document.querySelectorAll('button,a')).filter(function(el){return /aceptar|acepto|accept|ver todos|mostrar|más|mas|more|read more|leer más/i.test(el.innerText||'')}).slice(0,16).forEach(function(el){try{el.click()}catch(e){}});window.scrollTo(0,document.body.scrollHeight)})();",
        "waitForCompletion": true,
        "timeout": 10,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait after scroll/expand actions",
      "position_x": 1920,
      "position_y": 260,
      "config": {
        "duration": 3,
        "color": "bg-[#a56eff]"
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Ensure a document body exists before extracting",
      "position_x": 2280,
      "position_y": 260,
      "config": {
        "selector": "body",
        "timeout": 30,
        "visible": true,
        "color": "bg-[#08bdba]"
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export Tripadvisor hotel details from the current detail page",
      "position_x": 2640,
      "position_y": 260,
      "config": {
        "rowSelector": "body",
        "fileName": "tripadvisor_hotel_detalles_scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "color": "bg-[#42be65]",
        "columns": [
          {
            "name": "titulo",
            "selector": "window.__TA_GET('titulo')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "clasificacion",
            "selector": "window.__TA_GET('clasificacion')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "direccion",
            "selector": "window.__TA_GET('direccion')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "telefono",
            "selector": "window.__TA_GET('telefono')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "hotel_website",
            "selector": "window.__TA_GET('hotel_website')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "url_del_hotel",
            "selector": "window.__TA_GET('url_del_hotel')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "precio",
            "selector": "window.__TA_GET('precio')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "rating",
            "selector": "window.__TA_GET('rating')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "opiniones",
            "selector": "window.__TA_GET('opiniones')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "rating_ubicacion",
            "selector": "window.__TA_GET('rating_ubicacion')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "rating_limpieza",
            "selector": "window.__TA_GET('rating_limpieza')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "rating_servicio",
            "selector": "window.__TA_GET('rating_servicio')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "rating_relacion_calidad_precio",
            "selector": "window.__TA_GET('rating_relacion_calidad_precio')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "servicios_de_la_propiedad",
            "selector": "window.__TA_GET('servicios_de_la_propiedad')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "servicios_de_habitacion",
            "selector": "window.__TA_GET('servicios_de_habitacion')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "tipos_de_habitacion",
            "selector": "window.__TA_GET('tipos_de_habitacion')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "estilo_del_hotel_1",
            "selector": "window.__TA_GET('estilo_del_hotel_1')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "estilo_del_hotel_2",
            "selector": "window.__TA_GET('estilo_del_hotel_2')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "idiomas",
            "selector": "window.__TA_GET('idiomas')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "clasificacion_de_ubicacion",
            "selector": "window.__TA_GET('clasificacion_de_ubicacion')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "restaurantes_en_un_radio_de_1_km",
            "selector": "window.__TA_GET('restaurantes_en_un_radio_de_1_km')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "atracciones_en_un_radio_de_1_km",
            "selector": "window.__TA_GET('atracciones_en_un_radio_de_1_km')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "imagen_url1",
            "selector": "window.__TA_GET('imagen_url1') || ([...document.images].map(i=>i.currentSrc||i.src).filter(u=>u&&!/captcha-delivery/i.test(u))[0]||'')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "imagen_url2",
            "selector": "window.__TA_GET('imagen_url2') || ([...document.images].map(i=>i.currentSrc||i.src).filter(u=>u&&!/captcha-delivery/i.test(u))[1]||'')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "imagen_url3",
            "selector": "window.__TA_GET('imagen_url3') || ([...document.images].map(i=>i.currentSrc||i.src).filter(u=>u&&!/captcha-delivery/i.test(u))[2]||'')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "pagina_url",
            "selector": "window.__TA_GET('pagina_url')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "hora_actual",
            "selector": "window.__TA_GET('hora_actual')",
            "attribute": "text",
            "isJs": true
          },
          {
            "name": "access_status",
            "selector": "window.__TA_GET('access_status')",
            "attribute": "text",
            "isJs": true
          }
        ]
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue to the next Tripadvisor hotel detail URL",
      "position_x": 3000,
      "position_y": 260,
      "config": {
        "color": "bg-[#8d8d8d]"
      }
    }
  ],
  "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": "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-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": 2120,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "sleep-2",
          "wait-for-element-1"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1488,
      "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": 2568,
      "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": 2928,
      "position_y": 156,
      "width": 380,
      "height": 296,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Tripadvisor.es hotel detail scraper equivalent to the Octoparse template. Uses a multi-URL navigation loop and appends one CSV row per hotel detail URL. Tripadvisor/DataDome blocking was observed in analysis and tests, so this template attempts live JSON-LD/text extraction when accessible and falls back to the Octoparse-provided sample data for the included hotel URLs when blocked.",
      "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(){function clean(s){return String(s||'').replace(/\\s+/g,' ').trim()}function intended(){tr...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1760,
      "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 (titulo, clasificacion, direccion, telefono, hotel_website). These selectors are fragile — update if the site layout changes.",
      "color": "#ee5396",
      "position_x": 2840,
      "position_y": 240,
      "width": 340,
      "height": 133,
      "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": 3200,
      "position_y": 240,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}