diff --git a/rpopfetch.py b/rpopfetch.py index b7c4ef6..d5bee45 100644 --- a/rpopfetch.py +++ b/rpopfetch.py @@ -180,6 +180,10 @@ def convert_monthly_content_to_json(content, year, month): # remove the "th", "st", "nd", "rd" from the day parts[0] = parts[0].replace('th', '').replace('st', '').replace('nd', '').replace('rd', '') + + # make the links an empty list if it's null + if parts[5] == None: + parts[5] = [] # create a json entry from the parsed data json_entry = {