I make a parser using symfony / Domcrawler and there is a need to get the href value of some elements. How to do it?
<a class="Place__headerLink Place__title Link Link--shade-80 h5 small Place--lineClamping" href="https://club-drozdy.relax.by/" target="_blank" title="Drozdy Club" data-reactid=".yfuzkhv2j8.5.0.0.1.0.0.$10336959.2.1.0.0.0.0">Drozdy Club</a> And so I get the value itself
$crawler->filter('div.PlaceList__itemWrapper:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > a:nth-child(1)');
->attr('href')or->link()->getUri()don't work? or does your search for the necessary element returnnull? - teran->attr('href')does everything as it should. I didn’t seem to be watching the documentation carefully) - RedScreed