def is_streaming():
    if getattr(settings, 'LIVE_STREAM_DISABLE', False):
        return False
    try:
        r = requests.head(settings.LIVE_STREAM_URL, timeout=1)
    except (requests.ConnectionError, requests.Timeout):
        return False
    else:
        return 200 <= r.status_code < 300
Check if video live stream is running.
dataset/ETHPy150Open kiberpipa/Intranet/pipa/video/utils.py/is_streaming