From bd2fc602114cdfa959ff45c17840ed0db47d69aa Mon Sep 17 00:00:00 2001 From: DidierMetral <90394257+DidierMetral@users.noreply.github.com> Date: Sat, 12 Oct 2024 00:19:53 +0200 Subject: [PATCH] Fix regexp url #70 Add dash and uppercase in url regexp --- aiopyarr/request_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiopyarr/request_client.py b/aiopyarr/request_client.py index f5395fb..460e056 100644 --- a/aiopyarr/request_client.py +++ b/aiopyarr/request_client.py @@ -124,7 +124,7 @@ def __init__( # pylint: disable=too-many-arguments, too-many-locals self._host = host_configuration if self._host.url: - regex = r"(https?:\/\/[a-z|\d|\.]*[^:])([\/^:\d]*)(.*)" + regex = r"(https?:\/\/[a-z|A-Z|\d|\.|\-]*[^:])([\/^:\d]*)(.*)" if (res := search(regex, self._host.url)) and not res.group(2): self._host.url = f"{res.group(1).rstrip('/')}:{port}/{res.group(3)}" self._host.url = self._host.url.rstrip("/")