Who can successfully scraping of the phone number of this page?

Hello,

I am sure that it's possible to get the phone number hidden behind the green button "CONTACTAR", but how to do it ?

Url: [https://www.milanuncios.com/seat-de-segunda-mano/seat-altea-1-6-tdi-110-cv-gps-266859929.htm]

Sitemap:

{"_id":"test_extract_tel","startUrl":["https://www.milanuncios.com/seat-de-segunda-mano/seat-altea-1-6-tdi-110-cv-gps-266859929.htm"],"selectors":[{"id":"car","type":"SelectorText","selector":"div.pagAnuTituloBox a","parentSelectors":["_root"],"multiple":false,"regex":"","delay":0},{"id":"price","type":"SelectorText","selector":"div.pagAnuPrecioTexto","parentSelectors":["_root"],"multiple":false,"regex":"","delay":0},{"id":"contactar","type":"SelectorElementClick","selector":"div.telefonos","parentSelectors":["_root"],"multiple":false,"delay":0,"clickElementSelector":"button.pagAnuContactButton","clickType":"clickMore","discardInitialElements":false,"clickElementUniquenessType":"uniqueText"}]}

Select it with HTML selector and use regex.

Selector: div.pagAnuContact
Regex: '\d+'

Thank's Kristaps,

but if I retrieve a number, it is not the good !

With your advise, I have modified the sitemaps and I got the telephone number : 266859929.

But, without the extension, if you click on the button "contactar" the good tel number is the following: 651770167.

I can't explain this difference . Could you look again at my sitemap corrected:

{"_id":"test_extract_tel","startUrl":["https://www.milanuncios.com/seat-de-segunda-mano/seat-altea-1-6-tdi-110-cv-gps-266859929.htm"],"selectors":[{"id":"car","type":"SelectorText","selector":"div.pagAnuTituloBox a","parentSelectors":["_root"],"multiple":false,"regex":"","delay":0},{"id":"price","type":"SelectorText","selector":"div.pagAnuPrecioTexto","parentSelectors":["_root"],"multiple":false,"regex":"","delay":0},{"id":"contactar","type":"SelectorHTML","selector":"div.pagAnuContact","parentSelectors":["_root"],"multiple":false,"regex":"'\d+'","delay":0}]}

Unfortunately you won't be able to scrape the phone number because it is stored in iframe. You can scrape the iframe URL from src attribute and then with another sitemap scrape that iframe.

Thank you for your reply.

How do you recognize in this example that the encoding of the html page the phone number is stored in iframe (sorry for this question but my knowledge of the html language is very bad, I do not know how to find in the code that we are in presence of an iframe storage)

Do you have a tutorial or an example to show me how to "Can you scratch the iframe URL of the src attribute"?

You just have to go through source code manually to find it.

To scrape iframe URL you have to use element attribute selector and as attribute define "src".

Thanks but it is not very clear to me.

Ok for going through the source code, but find what ?
Find the word "iframe" ?

Element that is called iframe.