protected function expandUrl($url)
    {
        // skip if no short url
        if (!ParserUtil::isShortUrl($url)) {
            return $url;
        }

        $header_location = get_headers($url, 1)['Location'];

        return $header_location ?: $url;
    }