Ejemplo n.º 1
0
    def update_with_dic(dic):
        mysql = MysqlHelper(Configs())
        update_sql = ScrappdeDataDao.part_dic_to_update_sql(dic)
        sql = "update " + tableName + " set " + update_sql + " where id = '" + dic[
            'id'] + "'"

        mysql.update(sql)
Ejemplo n.º 2
0
def reset_target_valid(target):
    mysql = MysqlHelper(Configs())
    sql = "update scraping_target set valid = 0 where id = '" + target.id + "'"

    mysql.update(sql)
Ejemplo n.º 3
0
    def reset_target_valid(self, target):
        mysql = MysqlHelper(Configs())
        sql = "update " + self.table_name + " set " + self.TB.valid.key + " = 0 where " + self.TB.id.key + " = '" + target.id + "'"

        mysql.update(sql)