Fetch the schedules for the given rooms.

def fetch_todays_schedule(self, rooms):
        """ Fetch the schedules for the given rooms. """
        room_ids = self.fetch_room_ids(rooms)
        inst_id = self.fetch_inst_id()
        ret = {}
        now = datetime.datetime.now()
        day = DAYS[now.isoweekday() - 1]
        for room_name in room_ids:
            ret[room_name] = []
            try:
                events = msgpack.unpack(urllib2.urlopen(
                    "%s/snapshot/head/%s/location/%s?format=msgpack" % (
                        self.url, inst_id, room_ids[room_name])))['events']
            except urllib2.HTTPError, e:
                raise RuusterError(e)
            for event in events:
                starttime = datetime.datetime.strptime(
                        event['starttime'], '%H:%M:%S').time()
                endtime = datetime.datetime.strptime(
                        event['endtime'], '%H:%M:%S').time()
                if event['day'] != day:
                    continue
                ok = False
                for period in event['eventperiods']:
                    startdate = datetime.datetime.strptime(
                            period['startdate'], '%Y-%m-%d %H:%M:%SZ').date()
                    enddate = datetime.datetime.strptime(
                            period['enddate'], '%Y-%m-%d %H:%M:%SZ').date()
                    if (startdate <= now.date() and now.date() <= enddate):
                        ok = True
                        break
                if not ok:
                    continue
                name = event['course']['name']
                if name == 'Reserveringen' and 'comment' in event:
                    name = event['comment']
                ret[room_name].append((starttime, endtime,
                        normalize_event_name(name)))
        return ret