diff --git a/github_nonpublic_api/api.py b/github_nonpublic_api/api.py index be69954..34c6c9d 100644 --- a/github_nonpublic_api/api.py +++ b/github_nonpublic_api/api.py @@ -262,7 +262,7 @@ def download_dormant_users_report(self, enterprise_name: str) -> requests.Respon page = _get_url_with_session(session=self._session, url=url) link = re.search( r"https://github.com/enterprises/alphabet/settings/dormant-users/exports/[0-9A-Fa-f]{8}\\-[0-9A-Fa-f]{4}\\-[0-9A-Fa-f]{4}\\-[0-9A-Fa-f]{4}\\-[0-9A-Fa-f]{12}", - page.content, + page.content.decode("utf-8"), ) if link is None: raise ValueError("Unable to find dormant users report link in content.") @@ -324,4 +324,4 @@ def _data_callback(data): username=config["username"], password=config["password"], tfa_callback=lambda: pyotp.TOTP(config["otp_seed"]).now(), - ) \ No newline at end of file + )