Exemple #1
0
 def get_not_crawler_from_keyword(self):
     mysqlCn = MysqlCn(self.config)
     sql = "SELECT count(id) as `count` FROM keyword_info WHERE `status`>1 AND priority = 1 AND province_id IS NOT NULL;"
     result = mysqlCn.getAll(sql)
     mysqlCn.dispose()
     if result:
         return result[0].get('count')
     else:
         return False
Exemple #2
0
 def get_sectino_num(self):
     mysqlCn = MysqlCn(self.config)
     sql = "SELECT section_num,province_id,max_num,current_num  FROM regno_statistic WHERE status = 0 AND section_num IS NOT NULL LIMIT 1;"
     result = mysqlCn.getAll(sql)
     mysqlCn.dispose()
     if len(result) > 0:
         return result[0]
     else:
         return False
Exemple #3
0
 def is_rengo_exit(self, regno):
     mysqlCn = MysqlCn(self.config)
     tmd5 = self.md5(regno)
     sql = "SELECT COUNT(`id`) AS counts FROM business_info WHERE md5 = %s;"
     result = mysqlCn.getAll(sql, (tmd5, ))
     mysqlCn.dispose()
     if result[0].get('counts') == 0:
         return False
     else:
         return True