How can I scrape the emails of all the single cities?

I cannot create the correct Sitemap. I would need to scrape the email addresses of the single cities but I am not an expert and there is something I'm doing wrong. Thanks to whoever can help me.

Url: https://www.comuni-italiani.it/

Sitemap:
{"_id":"Italia","startUrl":["https://www.comuni-italiani.it/"],"selectors":[{"id":"Regione","linkType":"linkFromHref","multiple":true,"parentSelectors":["_root"],"selector":".main a","type":"SelectorLink"},{"id":"Citta","linkType":"linkFromHref","multiple":true,"parentSelectors":["_root"],"selector":".tabwrap td[width] a","type":"SelectorLink"},{"id":"Comune","linkType":"linkFromHref","multiple":true,"parentSelectors":["_root"],"selector":".tabwrap td[width] a","type":"SelectorLink"},{"id":"nome","multiple":false,"multipleType":"singleColumn","parentSelectors":["Comune"],"regex":"","selector":".main td","type":"SelectorText"},{"id":"popolazione","multiple":false,"multipleType":"singleColumn","parentSelectors":["Comune"],"regex":"","selector":"tr:nth-of-type(6) td[align]","type":"SelectorText"},{"id":"Email","multiple":false,"parentSelectors":["Comune"],"regex":"","selector":"[width='40%'] tr:nth-of-type(18) a","type":"SelectorHTML"},{"id":"email2","linkType":"linkFromHref","multiple":false,"parentSelectors":["Comune"],"selector":"[width='40%'] tr:nth-of-type(18) a","type":"SelectorLink"},{"id":"email3","multiple":false,"multipleType":"singleColumn","parentSelectors":["Comune"],"regex":"","selector":"[width='40%'] tr:nth-of-type(18) a","type":"SelectorText"}]}

Hi,

You can scrape the e-mail with an Element attribute selector:

{"_id":"Italia","startUrl":["https://www.comuni-italiani.it/"],"selectors":[{"id":"Regione","linkType":"linkFromHref","multiple":true,"parentSelectors":["_root"],"selector":".main a","type":"SelectorLink"},{"id":"nome","multiple":false,"multipleType":"singleColumn","parentSelectors":["Comune"],"regex":"","selector":".main td","type":"SelectorText"},{"id":"popolazione","multiple":false,"multipleType":"singleColumn","parentSelectors":["Comune"],"regex":"","selector":"tr:nth-of-type(6) td[align]","type":"SelectorText"},{"extractAttribute":"href","id":"Email","multiple":false,"multipleType":"singleColumn","parentSelectors":["Comune"],"selector":"tbody [href*=\"mailto:\"]","type":"SelectorElementAttribute","version":2},{"id":"Comune","linkType":"linkFromHref","multiple":true,"parentSelectors":["Citta"],"selector":".tabwrap td[width] a","type":"SelectorLink"},{"id":"Citta","linkType":"linkFromHref","multiple":true,"parentSelectors":["Regione"],"selector":".tabwrap td[width] a","type":"SelectorLink"}]}
1 Like