Extract phone number for div popup

Hello,

I want to extract a phone number which is opened by a click on a img.
But I can't scrape it !
It s work where i look data in the element but not when I scrape all.

Thanks for your help

{"_id":"test2","startUrl":["https://annuaire.experts-comptables.org/recherche?localite=&lat=&lon=&type_localite=&comptable=&seed="],"selectors":[{"id":"pagination","parentSelectors":["_root","pagination"],"paginationType":"auto","selector":".active span, a.page-link, li.disabled","type":"SelectorPagination"},{"id":"element","parentSelectors":["pagination"],"type":"SelectorElement","selector":"div.profil-block","multiple":true,"delay":0},{"id":"cabinet","parentSelectors":["element"],"type":"SelectorText","selector":"div.name a","multiple":false,"delay":0,"regex":""},{"id":"adresse","parentSelectors":["element"],"type":"SelectorText","selector":".d-desktop-block span","multiple":false,"delay":0,"regex":""},{"id":"expert","parentSelectors":["element"],"type":"SelectorText","selector":"div.competence","multiple":true,"delay":0,"regex":""},{"id":"Lien","parentSelectors":["element"],"type":"SelectorLink","selector":"a.d-flex","multiple":false,"delay":0},{"id":"div tel","parentSelectors":["element"],"type":"SelectorElementClick","clickElementSelector":"div.mr-2","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":2000,"discardInitialElements":"do-not-discard","multiple":false,"selector":"div.mr-2"},{"id":"numtel","parentSelectors":["div tel"],"type":"SelectorText","selector":"a.phone-link","multiple":false,"delay":0,"regex":""}]}

@rmonchalin Hi, that happens due to the fact that the phone number is not consistently available within the HTML of the page and it has not a related parent selector you could use for the extraction of other data points.

To circumvent that you should scrape the phone number from the profile page instead.

Example:

{"_id":"test-2","startUrl":["https://annuaire.experts-comptables.org/expert-comptable/9037-aduline-lyon-69"],"selectors":[{"clickElementSelector":"div.firm-phone","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1200,"discardInitialElements":"discard-when-click-element-exists","id":"phone-click","multiple":true,"parentSelectors":["_root"],"selector":"body","type":"SelectorElementClick"},{"delay":0,"id":"phone","multiple":false,"parentSelectors":["phone-click"],"regex":"","selector":"a.phone-link","type":"SelectorText"},{"delay":0,"id":"title","multiple":false,"parentSelectors":["phone-click"],"regex":"","selector":"h1","type":"SelectorText"}]}

@viesturs Thanks a lot !
I insert your answer in the pagination and i scraped the phone number.
It's longer to extract datas and I have multiple similars rows but it works :+1:

FYI
{"_id":"avec-tel","startUrl":["https://annuaire.experts-comptables.org/recherche?localite=&lat=&lon=&type_localite=&comptable=&seed="],"selectors":[{"id":"pagination","parentSelectors":["_root","pagination"],"paginationType":"auto","selector":".active span, a.page-link, li.disabled","type":"SelectorPagination"},{"id":"element","parentSelectors":["pagination"],"type":"SelectorElement","selector":"div.profil-block","multiple":true,"delay":0},{"id":"cabinet","parentSelectors":["element"],"type":"SelectorText","selector":"div.name a","multiple":false,"delay":0,"regex":""},{"id":"adresse","parentSelectors":["element"],"type":"SelectorText","selector":".d-desktop-block span","multiple":false,"delay":0,"regex":""},{"id":"expert","parentSelectors":["element"],"type":"SelectorText","selector":"div.competence","multiple":true,"delay":0,"regex":""},{"id":"Lien","parentSelectors":["element"],"type":"SelectorLink","selector":"a.d-flex","multiple":false,"delay":0},{"id":"lien-fiche","parentSelectors":["element"],"type":"SelectorLink","selector":"div.name a","multiple":false,"delay":0},{"id":"numtel","parentSelectors":["lien-fiche"],"type":"SelectorText","selector":"a.phone-link","multiple":false,"delay":0,"regex":""},{"id":"phone-click","parentSelectors":["lien-fiche"],"type":"SelectorElementClick","clickElementSelector":"div.firm-phone","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickOnce","delay":1200,"discardInitialElements":"discard-when-click-element-exists","multiple":true,"selector":"body"},{"id":"phone","parentSelectors":["phone-click"],"type":"SelectorText","selector":"a.phone-link","multiple":false,"delay":0,"regex":""},{"id":"titre","parentSelectors":["phone-click"],"type":"SelectorText","selector":"div.name a","multiple":false,"delay":0,"regex":""},{"id":"experts","parentSelectors":["phone-click"],"type":"SelectorText","selector":"div.competence","multiple":true,"delay":0,"regex":""}]}