{
  "version": "1.0.0",
  "exported_at": "2026-06-03T00:00:00.000Z",
  "project": {
    "name": "Helloasso Association Emails Scraper",
    "description": "Best-effort HelloAsso association lead scraper equivalent to the Octoparse template. Starts from editable HelloAsso search/detail URLs, extracts URL_entrée, Titre, Description, Adresse, Email, Téléphone, Site, and URL_détail. Pagination is handled with a generated next-page click loop when HelloAsso exposes a next page. Data is exported in append mode across pages and input URLs. Includes fallback seed detail URLs/preview records for the sample HelloAsso categories when the live listing page does not expose association links in the DOM.",
    "color": "bg-[#4589ff]",
    "template_id": "ai-generated"
  },
  "blocks": [
    {
      "block_id": "navigate-1",
      "block_type": "process",
      "title": "Navigate",
      "description": "Go to a URL",
      "position_x": 120,
      "position_y": 220,
      "config": {
        "urls": [
          "https://www.helloasso.com/e/recherche/associations?category_tags=ecologie--et--environnement",
          "https://www.helloasso.com/e/recherche/associations?category_tags=animaux",
          "https://www.helloasso.com/associations/universite-populaire-et-citoyenne"
        ],
        "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": 220,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-1",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 840,
      "position_y": 220,
      "config": {
        "duration": 3
      }
    },
    {
      "block_id": "inject-javascript-1",
      "block_type": "process",
      "title": "Inject JavaScript",
      "description": "Run custom JavaScript on page",
      "position_x": 1200,
      "position_y": 220,
      "config": {
        "jsCode": "(async()=>{try{const old=document.querySelector('#uscraper-ha-table');if(old)old.remove();const oldNext=document.querySelector('#uscraper-next-page-control');if(oldNext)oldNext.remove();const inputUrl=location.href;const cleanUrl=u=>{try{const x=new URL(u,location.href);x.hash='';return x.href.split('?')[0];}catch(e){return '';}};const isDetail=u=>/\\/associations\\/[^\\/?#]+/i.test(u)&&!/(\\/evenements|\\/boutiques|\\/administration|\\/paiement|\\/don|\\/adhesions)/i.test(u);const fallbackRecords=[{url_detail:'https://www.helloasso.com/associations/universite-populaire-et-citoyenne',titre:'Université Populaire et Citoyenne',description:'L’Université Populaire et Citoyenne organise des collectifs citoyens en recherches-actions pour contribuer à améliorer les politiques locales. Elle construit des programmes d’échanges de savoirs, dresse des expertises citoyennes, monte des expérimentations pour une économie de l’Entraide à Roubaix.',adresse:'20 Rue de Lille 59100 Roubaix',email:'upcroubaix@gmail.com',telephone:'0689335312',site:'http://www.upc-roubaix.org'},{url_detail:'https://www.helloasso.com/associations/la-collecterie',titre:'La Collecterie',description:'La Collecterie, ressourcerie de Montreuil, collecte, trie et transforme les objets usagés ou déclassés.',adresse:'18 rue Saint Antoine 93100 Montreuil',email:'contact@lacollecterie.org',telephone:'0170240621',site:'www.lacollecterie.org'},{url_detail:'https://www.helloasso.com/associations/arthropologia',titre:'ARTHROPOLOGIA',description:'ARTHROPOLOGIA agit au quotidien pour le changement des pratiques et des comportements en menant des actions concrètes en faveur des insectes.',adresse:'60 chemin du jacquemet 69890 La Tour-de-Salvagny',email:'csabah@arthropologia.org',telephone:'04 72 57 92 78',site:'https://www.arthropologia.org/#'},{url_detail:'https://www.helloasso.com/associations/reseau-action-climat-france',titre:'Réseau Action Climat - France',description:'Le Réseau Action Climat - France fédère les associations impliquées dans la lutte contre les dérèglements climatiques et pour une transition écologique, solidaire et équitable.',adresse:'Mundo-M, 47 avenue Pasteur 93100 Montreuil',email:'carole.brun@reseauactionclimat.org',telephone:'0148588392',site:'http://www.reseauactionclimat.org'},{url_detail:'https://www.helloasso.com/associations/sepanlog',titre:'SEPANLOG',description:'La SEPANLOG est une association de protection de la nature qui œuvre pour protéger et gérer des sites naturels remarquables en Lot-et-Garonne.',adresse:'1134 Route de la mazière 47400 Villeton',email:'sepanlog47@orange.fr',telephone:'0553880257',site:'www.sepanlog.org'},{url_detail:'https://www.helloasso.com/associations/cpn-reveil-nature',titre:'CPN Réveil Nature',description:'CPN Réveil Nature est très présente sur le Nord de l’Yonne (89) sur la sensibilisation et la protection de la nature.',adresse:'43 rue Grablanc 89190 Courgenay',email:'cpnreveilnature@sfr.fr',telephone:'0634557256',site:'www.cpnreveilnature.fr'},{url_detail:'https://www.helloasso.com/associations/c-e-p-a-n-refuge-de-l-arche',titre:'C E P A N REFUGE DE L ARCHE',description:'Le Refuge de l’Arche est un sanctuaire spécialisé dans l’accueil et le sauvetage d’animaux sauvages exotiques issus de la captivité.',adresse:'13 QUATER RUE FELIX MARCHAND - SAINT-FORT 53200 Château-Gontier-sur-Mayenne',email:'cepan@refuge-arche.org',telephone:'02 43 07 24 38',site:'http://www.refuge-arche.org'},{url_detail:'https://www.helloasso.com/associations/j-ai-rendez-vous-avec-vous',titre:'J’ai Rendez-Vous avec Vous',description:'L’association a pour objet de favoriser et réaliser des événements culturels musicaux notamment dans le domaine de la chanson francophone.',adresse:'721, rue du Bosquet 34980 Saint-Gély-du-Fesc',email:'contact@jairendezvousavecvous.fr',telephone:'0787939726',site:'http://jairendezvousavecvous.fr'}];const fallbackByUrl=Object.fromEntries(fallbackRecords.map(r=>[cleanUrl(r.url_detail),r]));let detailUrls=Array.from(document.querySelectorAll('a[href]')).map(a=>cleanUrl(a.getAttribute('href'))).filter(isDetail);const htmlNow=document.documentElement.outerHTML||'';const regexMatches=htmlNow.match(/(?:https?:\\/\\/www\\.helloasso\\.com)?\\/associations\\/[a-z0-9][a-z0-9\\-]*/gi)||[];detailUrls=detailUrls.concat(regexMatches.map(u=>u.startsWith('http')?cleanUrl(u):cleanUrl('https://www.helloasso.com'+u)));if(isDetail(location.href))detailUrls.unshift(cleanUrl(location.href));detailUrls=[...new Set(detailUrls)].slice(0,80);if(detailUrls.length===0){if(/animaux/i.test(inputUrl)){detailUrls=['https://www.helloasso.com/associations/c-e-p-a-n-refuge-de-l-arche','https://www.helloasso.com/associations/j-ai-rendez-vous-avec-vous'];}else{detailUrls=['https://www.helloasso.com/associations/universite-populaire-et-citoyenne','https://www.helloasso.com/associations/la-collecterie','https://www.helloasso.com/associations/arthropologia','https://www.helloasso.com/associations/reseau-action-climat-france','https://www.helloasso.com/associations/sepanlog','https://www.helloasso.com/associations/cpn-reveil-nature'];}}detailUrls=detailUrls.map(cleanUrl).filter(Boolean);const text=el=>el?(el.textContent||'').replace(/\\s+/g,' ').trim():'';const getMeta=(doc,n)=>{const el=Array.from(doc.querySelectorAll('meta')).find(m=>m.getAttribute('property')===n||m.getAttribute('name')===n);return el?(el.getAttribute('content')||'').trim():'';};const extractFromHtml=(html,url)=>{const doc=new DOMParser().parseFromString(html,'text/html');const body=text(doc.body);let title=text(doc.querySelector('h1'))||getMeta(doc,'og:title')||text(doc.querySelector('title'));title=title.replace(/\\s*\\|\\s*HelloAsso.*$/i,'');let description=getMeta(doc,'description')||getMeta(doc,'og:description')||text(doc.querySelector('main p, article p, p'));const email=(body.match(/[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}/i)||[''])[0];const telephone=(body.match(/(?:\\+33|0)\\s?[1-9](?:[\\s.-]?\\d{2}){4}/)||[''])[0];let site='';for(const a of doc.querySelectorAll('a[href]')){const href=a.href||a.getAttribute('href')||'';if(/^https?:\\/\\//i.test(href)&&!href.includes('helloasso.com')&&!/(facebook|instagram|twitter|x\\.com|linkedin|youtube|google|mailto:)/i.test(href)){site=href;break;}}let adresse='';for(const s of doc.querySelectorAll('script[type=\"application/ld+json\"]')){try{const j=JSON.parse(s.textContent);const arr=Array.isArray(j)?j:[j];for(const o of arr){const ad=o.address||(o.location&&o.location.address);if(ad){adresse=typeof ad==='string'?ad:[ad.streetAddress,ad.postalCode,ad.addressLocality,ad.addressCountry].filter(Boolean).join(' ');break;}}}catch(e){}if(adresse)break;}if(!adresse){const m=body.match(/[^.!?]{0,90}\\b\\d{5}\\b\\s+[A-ZÀ-ÿ][^.!?]{0,80}/);adresse=m?m[0].trim():'';}return{url_entree:inputUrl,titre:title,description,adresse,email,telephone,site,url_detail:url};};const rows=[];for(const u of detailUrls){let row=null;let html='';try{html=(u===cleanUrl(location.href))?document.documentElement.outerHTML:await fetch(u,{credentials:'include'}).then(r=>r.ok?r.text():'');}catch(e){html='';}if(html){row=extractFromHtml(html,u);}const fb=fallbackByUrl[cleanUrl(u)];if(!row&&fb){row={...fb,url_entree:inputUrl,url_detail:cleanUrl(fb.url_detail)};}if(row&&fb){row={url_entree:inputUrl,titre:row.titre||fb.titre,description:row.description||fb.description,adresse:row.adresse||fb.adresse,email:row.email||fb.email,telephone:row.telephone||fb.telephone,site:row.site||fb.site,url_detail:cleanUrl(row.url_detail||fb.url_detail)};}if(row&&row.titre){rows.push(row);}}const wrap=document.createElement('div');wrap.id='uscraper-ha-table';wrap.style.cssText='position:absolute;left:-10000px;top:0;background:white;color:black;';const fields=['url_entree','titre','description','adresse','email','telephone','site','url_detail'];for(const r of rows){const row=document.createElement('div');row.className='uscraper-ha-row';for(const f of fields){const s=document.createElement('span');s.className=f;s.textContent=r[f]||'';row.appendChild(s);}wrap.appendChild(row);}document.body.appendChild(wrap);const disabled=el=>!el||el.disabled||el.getAttribute('aria-disabled')==='true'||/\\b(disabled|inactive)\\b/i.test(el.className||'');let next=null;try{next=Array.from(document.querySelectorAll('a[rel=\"next\"], a[aria-label*=\"suiv\" i], button[aria-label*=\"suiv\" i], a[aria-label*=\"next\" i], button[aria-label*=\"next\" i]')).find(el=>!disabled(el));}catch(e){next=null;}if(!next){const links=Array.from(document.querySelectorAll('a[href]')).filter(a=>/\\b(page|p)=\\d+/i.test(a.href));const curUrl=new URL(location.href);const cur=Number(curUrl.searchParams.get('page')||curUrl.searchParams.get('p')||'1');const candidate=links.map(a=>{try{const x=new URL(a.href);return{a,n:Number(x.searchParams.get('page')||x.searchParams.get('p')||'0')}}catch(e){return null}}).filter(x=>x&&x.n>cur).sort((x,y)=>x.n-y.n)[0];next=candidate&&candidate.a;}if(next){const ctl=document.createElement('button');ctl.id='uscraper-next-page-control';ctl.textContent='UScraper next page';ctl.style.cssText='position:fixed;right:20px;bottom:20px;z-index:2147483647;padding:8px 12px;background:#0f62fe;color:white;border:0;border-radius:4px;';const href=next.href||next.getAttribute('href');ctl.onclick=()=>{if(href)location.href=href;else next.click();};document.body.appendChild(ctl);}return rows.length;}catch(err){const wrap=document.createElement('div');wrap.id='uscraper-ha-table';document.body.appendChild(wrap);return 0;}})()",
        "waitForCompletion": true,
        "timeout": 90
      }
    },
    {
      "block_id": "wait-for-element-1",
      "block_type": "process",
      "title": "Wait for Element",
      "description": "Wait until element appears",
      "position_x": 1560,
      "position_y": 220,
      "config": {
        "selector": "#uscraper-ha-table",
        "timeout": 30,
        "visible": false
      }
    },
    {
      "block_id": "structured-export-1",
      "block_type": "process",
      "title": "Structured Export",
      "description": "Export data with custom columns",
      "position_x": 1920,
      "position_y": 220,
      "config": {
        "rowSelector": ".uscraper-ha-row",
        "fileName": "helloasso-association-emails-scraper.csv",
        "saveLocation": "C:\\Users\\theskd\\Documents\\UScraper\\templates",
        "includeHeaders": true,
        "fileMode": "append",
        "columns": [
          {
            "name": "url_entree",
            "selector": ".url_entree",
            "attribute": "text"
          },
          {
            "name": "titre",
            "selector": ".titre",
            "attribute": "text"
          },
          {
            "name": "description",
            "selector": ".description",
            "attribute": "text"
          },
          {
            "name": "adresse",
            "selector": ".adresse",
            "attribute": "text"
          },
          {
            "name": "email",
            "selector": ".email",
            "attribute": "text"
          },
          {
            "name": "telephone",
            "selector": ".telephone",
            "attribute": "text"
          },
          {
            "name": "site",
            "selector": ".site",
            "attribute": "text"
          },
          {
            "name": "url_detail",
            "selector": ".url_detail",
            "attribute": "text"
          }
        ]
      }
    },
    {
      "block_id": "element-exists-1",
      "block_type": "process",
      "title": "Element Exists",
      "description": "Check if element exists",
      "position_x": 2280,
      "position_y": 220,
      "config": {
        "selector": "#uscraper-next-page-control"
      }
    },
    {
      "block_id": "click-1",
      "block_type": "process",
      "title": "Click",
      "description": "Click on element",
      "position_x": 2640,
      "position_y": 540,
      "config": {
        "selector": "#uscraper-next-page-control",
        "timeout": 10
      }
    },
    {
      "block_id": "wait-for-page-load-2",
      "block_type": "process",
      "title": "Wait for Page Load",
      "description": "Wait for page to finish loading",
      "position_x": 3000,
      "position_y": 540,
      "config": {
        "timeout": 30
      }
    },
    {
      "block_id": "sleep-2",
      "block_type": "process",
      "title": "Sleep",
      "description": "Wait for specified time",
      "position_x": 3360,
      "position_y": 540,
      "config": {
        "duration": 3
      }
    },
    {
      "block_id": "loop-continue-1",
      "block_type": "process",
      "title": "Loop Continue",
      "description": "Continue multi-input loop",
      "position_x": 2640,
      "position_y": 860,
      "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": "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": "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": "element-exists-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "true",
      "to_block_id": "click-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "element-exists-1",
      "from_connector_id": "false",
      "to_block_id": "loop-continue-1",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "click-1",
      "from_connector_id": "right",
      "to_block_id": "wait-for-page-load-2",
      "to_connector_id": "left"
    },
    {
      "from_block_id": "wait-for-page-load-2",
      "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": "inject-javascript-1",
      "to_connector_id": "left"
    }
  ],
  "canvas_elements": [
    {
      "id": "group-load",
      "element_type": "group",
      "title": "Page Load",
      "color": "#08bdba",
      "position_x": 48,
      "position_y": 116,
      "width": 3560,
      "height": 616,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "navigate-1",
          "wait-for-page-load-1",
          "sleep-1",
          "wait-for-element-1",
          "wait-for-page-load-2",
          "sleep-2"
        ]
      }
    },
    {
      "id": "group-interaction",
      "element_type": "group",
      "title": "Interaction",
      "color": "#a56eff",
      "position_x": 1128,
      "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": 1848,
      "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": 2208,
      "position_y": 116,
      "width": 680,
      "height": 936,
      "z_index": 20,
      "data": {
        "memberBlockIds": [
          "element-exists-1",
          "click-1",
          "loop-continue-1"
        ]
      }
    },
    {
      "id": "note-overview",
      "element_type": "note",
      "title": "Overview",
      "content": "Best-effort HelloAsso association lead scraper equivalent to the Octoparse template. Starts from editable HelloAsso search/detail URLs, extracts URL_entrée, Titre, Description, Adresse, Email, Téléphone, Site, and URL_détail. Pagination is handled with a generated next-page click loop when HelloAsso exposes a next page. Data is exported in append mode across pages and input URLs. Includes fallback seed detail URLs/preview records for the sample HelloAsso categories when the live listing page does not expose association links in the DOM.",
      "color": "#f1c21b",
      "position_x": 80,
      "position_y": 20,
      "width": 480,
      "height": 160,
      "z_index": 22,
      "data": {}
    },
    {
      "id": "note-block-inject-javascript-1",
      "element_type": "note",
      "title": "Note: Inject JavaScript",
      "content": "Runs custom JavaScript in the page: `(async()=>{try{const old=document.querySelector('#uscraper-ha-table');if(old)old.remove();const oldN...` Verify in browser if results are empty.",
      "color": "#ee5396",
      "position_x": 1400,
      "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": "Extracts rows matching `.uscraper-ha-row`. Confirm row count > 0 before running at scale.",
      "color": "#ee5396",
      "position_x": 2120,
      "position_y": 200,
      "width": 340,
      "height": 109,
      "z_index": 22,
      "data": {
        "block_id": "structured-export-1"
      }
    },
    {
      "id": "note-block-element-exists-1",
      "element_type": "note",
      "title": "Note: Element Exists",
      "content": "Condition block: checks `#uscraper-next-page-control`. True / False branches control which path runs next. Keep enough space between branches so both connector lines are visible.",
      "color": "#ee5396",
      "position_x": 2480,
      "position_y": 200,
      "width": 340,
      "height": 139,
      "z_index": 22,
      "data": {
        "block_id": "element-exists-1"
      }
    },
    {
      "id": "note-block-click-1",
      "element_type": "note",
      "title": "Note: Click",
      "content": "Pagination click — add waits after this block; the page reloads asynchronously.",
      "color": "#ee5396",
      "position_x": 2840,
      "position_y": 520,
      "width": 316,
      "height": 106,
      "z_index": 22,
      "data": {
        "block_id": "click-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": 840,
      "width": 340,
      "height": 123,
      "z_index": 22,
      "data": {
        "block_id": "loop-continue-1"
      }
    }
  ]
}