final protected function parseUrl(Crawler $node, string $attr = 'href'): ?string
    {
        if (0 === $node->count()) {
            return null;
        }

        if ($url = $node->attr($attr)) {
            return preg_replace('/^\//', static::URL_PREFIX.'/', $url);
        }

        return null;
    }
final protected function parseUrl(Crawler $node, string $attr = 'href'): ?string
    {
        if (0 === $node->count()) {
            return null;
        }

        if ($url = $node->attr($attr)) {
            return preg_replace('/^\//', static::URL_PREFIX.'/', $url);
        }

        return null;
    }
final protected function parseUrl ( Crawler $ node , string $ attr = 'href' ) : ? string { if ( 0 === $ node -> count ( ) ) { return null ; } if ( $ url = $ node -> attr ( $ attr ) ) { return preg_replace ( '/^\//' , static :: URL_PREFIX . '/' , $ url ) ; } return null ; }
Parses a url node.

@param Crawler $node
@param string  $attr

@return string|null
Parses a url node .