soimort/you-get · warning · ValueError
The live stream is not online! (Errno:%s)
Error message
The live stream is not online! (Errno:%s)
What it means
Raised as ValueError in douyutv_download (src/you_get/extractors/douyutv.py:71). The API call succeeded (server_status == 0) but the room's show_status field is not '1', meaning the streamer is offline / the room is not broadcasting, so there is no rtmp stream to record.
Source
Thrown at src/you_get/extractors/douyutv.py:71
room_id = url[url.rfind('/') + 1:]
api_url = "http://www.douyutv.com/api/v1/"
args = "room/%s?aid=wp&client_sys=wp&time=%d" % (room_id, int(time.time()))
auth_md5 = (args + "zNzMV1y4EMxOHS6I5WKm").encode("utf-8")
auth_str = hashlib.md5(auth_md5).hexdigest()
json_request_url = "%s%s&auth=%s" % (api_url, args, auth_str)
content = get_content(json_request_url, headers)
json_content = json.loads(content)
data = json_content['data']
server_status = json_content.get('error', 0)
if server_status != 0:
raise ValueError("Server returned error:%s" % server_status)
title = data.get('room_name')
show_status = data.get('show_status')
if show_status != "1":
raise ValueError("The live stream is not online! (Errno:%s)" % server_status)
real_url = data.get('rtmp_url') + '/' + data.get('rtmp_live')
print_info(site_info, title, 'flv', float('inf'))
if not info_only:
download_url_ffmpeg(real_url, title, 'flv', params={}, output_dir=output_dir, merge=merge)
site_info = "douyu.com"
download = douyutv_download
download_playlist = playlist_not_supported('douyu')
View on GitHub (pinned to 049548f3f3)
Solutions
- Check the room page on douyu.com — if it shows offline, wait until the streamer is live and retry.
- If the room is clearly live in a browser, log data['show_status'] to see what Douyu now returns and update the comparison.
- For automation, poll the API until show_status == '1' before calling the downloader.
Example fix
# before
show_status = data.get('show_status')
if show_status != "1":
raise ValueError("The live stream is not online! (Errno:%s)" % server_status)
# after: wait for live in a scheduler before invoking
content = get_content(json_request_url, headers)
if json.loads(content)['data'].get('show_status') == "1":
douyutv_download(url, output_dir=output_dir, merge=merge) Defensive patterns
Strategy: validation
Validate before calling
import json, time
def douyu_room_is_live(room_id, headers):
from you_get.common import get_content
args = "room/%s?aid=wp&client_sys=wp&time=%d" % (room_id, int(time.time()))
import hashlib
auth = hashlib.md5((args + 'zNzMV1y4EMxOHS6I5WKm').encode('utf-8')).hexdigest()
data = json.loads(get_content('http://www.douyutv.com/api/v1/' + args + '&auth=' + auth, headers))
return data.get('error', 0) == 0 and data['data'].get('show_status') == '1' Try / catch
try:
douyutv_download(url, output_dir)
except ValueError as e:
if 'not online' in str(e):
schedule_retry(url, when='+15min') # streamer may go live later
else:
raise Prevention
- Poll the room API for show_status == '1' before starting an ffmpeg record.
- Treat offline as a scheduling condition, not a bug.
When it happens
Trigger: Calling douyutv_download for a room whose data.show_status != '1' — i.e. the broadcaster is offline, the room is closed/banned, or Douyu returned an unexpected show_status value (type/format change from string '1').
Common situations: Trying to record a live stream after it ended; scheduling a download for a room that rarely streams; Douyu changing show_status semantics so live rooms report a different value.
Related errors
- Server returned error:%s
- Playlist is not supported for
- Share not found or canceled: %s
- Server returned an error: %s (Incorrect password?)
- Flickr extractor is not supported for %s.
AI-assisted analysis of soimort/you-get@049548f3f3 (2026-08-15).
Data as JSON: /api/errors/50489350c5ef9588.
Report an issue: GitHub.