Exemplo n.º 1
0
def thread_diagnose(sqlconn_name):
    sqlconn = sqliteconn.sqlconn(sqlconn_name)
    #print 'ok'
    group_ret = sqlconn.read_group_info('group_info_diagnose')
    for group in group_ret:
        if get_diagnose_of_group(group, sqlconn):
            time.sleep(10)
Exemplo n.º 2
0
def thread_query(sqlconn_name):
    sqlconn = sqliteconn.sqlconn(sqlconn_name)
    group_ret = sqlconn.read_group_info('group_info_sug')
    idx = 0
    for group in group_ret:
        if get_query_of_group(group, sqlconn):
            time.sleep(10)
Exemplo n.º 3
0
 def thread_rank(self, sqlconn_name):
     sqlconn = sqliteconn.sqlconn(sqlconn_name)
     group_ret = sqlconn.read_group_info("group_info_rank")
     for group in group_ret:
         for key_rank_ret in self.get_rank_of_group(group, sqlconn):
             # 如果百度排名查询失败,则返回
             if key_rank_ret[2] == "-1|-1":
                 continue
             # print key_rank_ret
             sqlconn.insert_multi(key_rank_ret, "rank_compare")
Exemplo n.º 4
0
def thread_sug(sqlconn_name):
    sqlconn = sqliteconn.sqlconn(sqlconn_name)
    group_ret = sqlconn.read_group_info('group_info_sug')
    for group in group_ret:
        get_sug_of_group(group, sqlconn)
        time.sleep(10)
Exemplo n.º 5
0
def thread_crawler_company(sqlconn_name):
    sqlconn = sqliteconn.sqlconn(sqlconn_name)
    group_ret = sqlconn.read_group_info('group_info_company')
    for group in group_ret:
        get_company_of_group(group,sqlconn)
        time.sleep(10)
Exemplo n.º 6
0
 def mock_thread_rank(self, sqlconn_name):
     sqlconn = sqliteconn.sqlconn(sqlconn_name)
     group_ret = sqlconn.read_group_info("group_info_rank")
     for group in group_ret:
         for key_rank_ret in self.get_rank_of_group(group, sqlconn):
             print key_rank_ret