def insert_new_appearance(self, guestid, url): cursor = self.conn.stmtcursor() showdate = parse_wtprn_m3u_url(url) data = dict(guestid=guestid, showdate=showdate, url=url) cursor.insert('appearances', data)
def parse_appearance_m3u_url(url): date = parse_wtprn_m3u_url(url) sdate = date.ctime().replace('00:00:00', '') return sdate