soimort/you-get · error · Exception
No video found in this playlist
Error message
No video found in this playlist
What it means
Raised as plain Exception at the end of icourses_playlist_new (src/you_get/extractors/icourses.py:166). This function walks the course's chapter/section tree (showSectionNode2 -> to_sec -> get_playlist) looking for videos; if no branch ever yields a non-empty vlist, the playlist is considered video-less.
Source
Thrown at src/you_get/extractors/icourses.py:166
page = to_chap(hit.group(1), hit.group(2), hit.group(3))
hit_list = re.findall(res_patt, page)
if hit_list:
return get_playlist(hit_list[0][0], hit_list[0][1])
for hit in hit_list:
print(hit)
elif i[1] == 'showSectionNode2':
hit = re.search(show_sec_patt, i[2])
page = show_sec(hit.group(1), hit.group(2))
# print(page)
patt = r'ajaxtosection\(this,(\d+),(\d+),(\d+)\)'
hit_list = re.findall(patt, page)
# print(hit_list)
for hit in hit_list:
page = to_sec(hit[0], hit[1], hit[2])
vlist = re.findall(res_patt, page)
if vlist:
return get_playlist(vlist[0][0], vlist[0][1])
raise Exception("No video found in this playlist")
def get_playlist(res_id, course_id):
ep = 'http://www.icourses.cn/jpk/changeforVideo.action?resId={}&courseId={}'
req = get_content(ep.format(res_id, course_id))
patt = r'<a.+?changeforvideo\(\'(\d+)\',\'(\d+)\',\'(\d+)\'\).+?title=\"(.+?)\"'
return re.findall(patt, req)
class ICousesExactor(object):
PLAYER_BASE_VER = '150606-1'
ENCRYPT_MOD_VER = '151020'
ENCRYPT_SALT = '3DAPmXsZ4o' # It took really long time to find this...
def __init__(self, url):
self.url = url
self.title = ''View on GitHub (pinned to 049548f3f3)
Solutions
- Open the course in a browser and confirm it actually has videos.
- Log each section page fetched in icourses_playlist_new and check whether res_patt (and the ajaxtosection/show_sec_patt regexes) still match the HTML; update them if the markup changed.
- Upgrade you-get for current icourses page structure.
Defensive patterns
Strategy: try-catch
Try / catch
try:
icourses_playlist_download(url, output_dir)
except Exception as e:
if str(e) == 'No video found in this playlist':
verify_course_has_videos_in_browser(url) # content question, not code
else:
raise Prevention
- Confirm the course actually contains videos before automating.
- Log section pages during traversal so empty results can be distinguished from regex rot.
When it happens
Trigger: icourses_playlist_download hits the type-2 shared-course branch and icourses_playlist_new traverses all ajaxtosection(...) nodes, but every to_sec(...) page has no matches for res_patt; or the intermediate regexes (show_sec_patt etc.) fail so no section is even visited. The unconditional raise at function bottom then fires.
Common situations: Course that genuinely contains no downloadable videos (documents only); icourses markup/JS changes (ajaxtosection signature changed) so section pages parse empty; missing/garbled course data served to the scraper.
Related errors
- You can download it with -l flag
- Unknown url pattern
- Playlist is not supported for
- Cannot find flashvars
- API returned fail
AI-assisted analysis of soimort/you-get@049548f3f3 (2026-08-15).
Data as JSON: /api/errors/d104bfb4e81515c8.
Report an issue: GitHub.