protected function discover($url)
    {
        $endpoint = $this->findEndpointFromProviders($url);

        // if no provider was found, try to discover the endpoint URL
        if ($this->discovery && !$endpoint) {
            $discover = new Discoverer();
            $endpoint = $discover->getEndpointForUrl($url);
        }

        if (!$endpoint) {
            throw new \InvalidArgumentException('No oEmbed links found.');
        }

        return $endpoint;
    }