diff --git a/utils.py b/utils.py index 7abbfe6..328a335 100644 --- a/utils.py +++ b/utils.py @@ -38,7 +38,7 @@ def urlopen(url, retry = 0): except urllib.error.HTTPError as e: if e.code == 503: if retry < const.HTTP_RETRY: - utils.warn(f" Get {e.code} Error. Trying {retry}/{const.HTTP_RETRY}...") + utils.warn(f" Get {e.code} Error. Trying {retry+1}/{const.HTTP_RETRY}...") time.sleep(1) return urlopen(url, retry+1) else: @@ -46,7 +46,6 @@ def urlopen(url, retry = 0): else: raise e - def is_live(channel_id): url = f"https://www.youtube.com/channel/{channel_id}/live" with urlopen(url) as response: