def insert(self, drama_id, episode, time_release, source, url, hd_url): sql = "insert ignore into drama_episode (drama_id, episode, time_release, `source`, `url`, `hd_url`, time_created) values (?, ?, ?, ?, ?, ?, ?)" self.engine.execute( sql, (drama_id, episode, time_release, source, url, hd_url, cur_ms()))
def insert(self, name, year, poster, actor, desc, href, score=0): sql = "insert into drama (`name`, `poster`, `year`, `time_created`, `actors`, `description`, `source`, `score`) values (?, ?, ?, ?, ?, ?, ?, ?)" self.engine.execute( sql, (name, poster, year, cur_ms(), actor, desc, href, score))
def insert(self, drama_id, source, strategy): if not strategy: return sql = "insert into drama_get_strategy (drama_id, `source`, strategy, time_created) values (?, ?, ?, ?)" self.engine.execute(sql, (drama_id, source, json.dumps(strategy), cur_ms()))
def insert(self, drama_id, episode, time_release, source, url, hd_url): sql = "insert ignore into drama_episode (drama_id, episode, time_release, `source`, `url`, `hd_url`, time_created) values (?, ?, ?, ?, ?, ?, ?)" self.engine.execute(sql, (drama_id, episode, time_release, source, url, hd_url, cur_ms()))
def insert(self, name, year, poster, actor, desc, href, score=0): sql = "insert into drama (`name`, `poster`, `year`, `time_created`, `actors`, `description`, `source`, `score`) values (?, ?, ?, ?, ?, ?, ?, ?)" self.engine.execute(sql, (name, poster, year, cur_ms(), actor, desc, href, score))