def addFeedResUpdateTime(self, feedRes): sql = 'insert into feed_update_time (feed_id, update_time) values ({!r}, {!r})' self.db.executeDML(sql.format(feedRes.id, time2Str(feedRes.pubDate)))
def __init__(self, title, pubDate, link='', description='', fromId=0): self.fromFeedId = fromId self.title = decodeXML(title.strip()) self.pubDate = time2Str(str2Time(pubDate)) self.link = link self.description = description
def addFilterPattern(self, reason, tag): sql = 'insert into reason_of_filtered(content, type_id, create_time) values({!r},{!r},{!r})' curTime = time2Str(datetime.datetime.now()) self.db.executeDML(sql.format(reason, tag, curTime))