Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit 04b4191

Browse files
committed
Show error when no lectures are found
1 parent a627fdd commit 04b4191

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ilc_scrape.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ def main():
263263
print_quit("Error fetching course info. Is the url proper?")
264264

265265
lectures = response.json()
266+
if not lectures:
267+
print_quit("No lectures found. Is the url proper?")
268+
266269
total_lecs = len(lectures)
267270
subject_name = "{subjectName} {sessionName}".format(**lectures[0])
268271
working_dir: Path = args.dest / subject_name

0 commit comments

Comments
 (0)