Skip to content

Commit

Permalink
fix: work around 404 error?
Browse files Browse the repository at this point in the history
  • Loading branch information
marnixah authored and lekoOwO committed Jan 12, 2022
1 parent 1c7aeda commit 232a8dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import time
import os
import threading
import urllib

import utils
import getm3u8
Expand Down Expand Up @@ -188,7 +189,11 @@ def clear_chat():

utils.log(f" {message}")

is_live = utils.is_live(channel_id)
try:
is_live = utils.is_live(channel_id)
except urllib.error.HTTPError as e:
utils.warn(f" got HTTPError when checking live status for channel \"{channel_id}\". {e}")
is_live = False
if is_live:
utils.log(f"[{channel_name}] On live!")

Expand Down

0 comments on commit 232a8dc

Please sign in to comment.