Creates a partial :class:`Webhook` from a webhook URL.

        Parameters
        ------------
        url: :class:`str`
            The URL of the webhook.
        adapter: :class:`WebhookAdapter`
            The webhook adapter to use when sending requests. This is
            typically :class:`AsyncWebhookAdapter` for ``aiohttp`` or
            :class:`RequestsWebhookAdapter` for ``requests``.

        Raises
        -------
        InvalidArgument
            The URL is invalid.

def from_url(cls, url, *, adapter):
        """Creates a partial :class:`Webhook` from a webhook URL.

        Parameters
        ------------
        url: :class:`str`
            The URL of the webhook.
        adapter: :class:`WebhookAdapter`
            The webhook adapter to use when sending requests. This is
            typically :class:`AsyncWebhookAdapter` for ``aiohttp`` or
            :class:`RequestsWebhookAdapter` for ``requests``.

        Raises
        -------
        InvalidArgument
            The URL is invalid.
        """

        m = re.search(r'discordapp.com/api/webhooks/(?P<id>[0-9]{17,21})/(?P<token>[A-Za-z0-9\.\-\_]{60,68})', url)
        if m is None:
            raise InvalidArgument('Invalid webhook URL given.')
        return cls(m.groupdict(), adapter=adapter)