diff --git a/pyderman/util/downloader.py b/pyderman/util/downloader.py index 4758137..91878e8 100644 --- a/pyderman/util/downloader.py +++ b/pyderman/util/downloader.py @@ -19,7 +19,7 @@ def get_redirect(url) -> str | None: req = _open(url) if not req: return None - return req.geturl() + return str(req.geturl()) def raw(url: str, encoding: str = "utf-8") -> str | None: diff --git a/pyderman/util/github.py b/pyderman/util/github.py index fbd97b2..55c94b5 100644 --- a/pyderman/util/github.py +++ b/pyderman/util/github.py @@ -19,9 +19,7 @@ def find_links( if not version: version = "latest" if version == "latest": - redirect = downloader.get_redirect( - make_releases_url(author, project, version) - ) + redirect = downloader.get_redirect(make_releases_url(author, project, version)) if not redirect: raise Exception(f"Unable to locate latest version of {project}") version = redirect.split("/")[-1]