|
|
@@ -44,7 +44,7 @@ class Zuqiupipeline(object):
|
|
|
# 比赛时间
|
|
|
time_game = str(item['time_game'])
|
|
|
# 比赛时间,时间戳
|
|
|
- us_time = str(datetime.datetime.now().year) + "-" + month + "-" + day + " " + time_game + ":00"
|
|
|
+ us_time = str(res.year) + "-" + month + "-" + day + " " + time_game + ":00"
|
|
|
# 现在时间,时间戳
|
|
|
utime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
|
|
|
# 比赛id
|
|
|
@@ -63,7 +63,7 @@ class Zuqiupipeline(object):
|
|
|
corner_ball = item['corner_ball']
|
|
|
match_date, match_time, time3 = new_time(us_time)
|
|
|
# 联赛接口写入
|
|
|
- last_time = '{}-12-31 23:59:59'.format(datetime.datetime.now().year)
|
|
|
+ last_time = '{}-12-31 23:59:59'.format(res.year)
|
|
|
league_list = []
|
|
|
uuid = Helper.genearte_uuid(league_name + 'hg3535')
|
|
|
if self.db.zq_league35.find({'lg_id': league_id}).count() < 1:
|
|
|
@@ -129,7 +129,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "gss_h" + str(index) + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
half_size_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
condition = fuhao(half_size_guest_rule[index])
|
|
|
@@ -144,7 +143,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "gsb_h" + str(index) + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
half_size_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
condition = fuhao(half_size_home_rule[index])
|
|
|
@@ -165,7 +163,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "gsb" + str(index) + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
size_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
condition = fuhao(size_home_rule[index])
|
|
|
@@ -180,7 +177,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "gss" + str(index) + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
size_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
condition = fuhao(size_guest_rule[index])
|
|
|
@@ -201,7 +197,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "cog_h" + str(index) + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
half_concede_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
condition = fuhao(half_concede_guest_rule[index])
|
|
|
@@ -217,7 +212,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "coh_h" + str(index) + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
half_concede_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
condition = fuhao(half_concede_home_rule[index])
|
|
|
@@ -237,10 +231,9 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "cog" + str(index) + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
concede_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
- condition = fuhao(concede_guest[index])
|
|
|
+ condition = fuhao(concede_guest_rule[index])
|
|
|
concede_guest_value = [match_id, league_id, "cog", "0", index, p_code, value, condition,
|
|
|
odds_only, sole, "hg3535", "0", ""]
|
|
|
concede_guest_data = dict(zip(concede_guest_key, concede_guest_value))
|
|
|
@@ -252,7 +245,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "coh" + str(index) + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
concede_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
condition = fuhao(concede_home_rule[index])
|
|
|
@@ -275,7 +267,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "ch_h" + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
half_capot_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
half_capot_home_value = [match_id, league_id, "ch_h", "0", 0, p_code, half_capot_home, '1',
|
|
|
@@ -288,7 +279,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "cg_h" + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
half_capot_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
half_capot_guest_value = [match_id, league_id, "cg_h", "0", 0, p_code, half_capot_guest, '2',
|
|
|
@@ -301,7 +291,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "cd_h" + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
half_capot_dogfall_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
half_capot_dogfall_value = [match_id, league_id, "cd_h", "0", 0, p_code, half_capot_dogfall, 'X',
|
|
|
@@ -314,7 +303,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "cd" + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
capot_dogfall_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
capot_dogfall_value = [match_id, league_id, "cd", "0", 0, p_code, capot_dogfall, 'X', odds_only,
|
|
|
@@ -327,7 +315,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "ch" + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
capot_home_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
capot_home_value = [match_id, league_id, "ch", "0", 0, p_code, capot_home, '1',
|
|
|
@@ -340,7 +327,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "cg" + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
capot_guest_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
capot_guest_value = [match_id, league_id, "cg", "0", 0, p_code, capot_home, '2',
|
|
|
@@ -361,7 +347,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "tss" + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
single_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
single_value = [match_id, league_id, "tss", "0", 0, p_code, odd_even_odd, '单',
|
|
|
@@ -374,7 +359,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "tsd" + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
double_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
double_value = [match_id, league_id, "tsd", "0", 0, p_code, odd_even_even, '双',
|
|
|
@@ -387,7 +371,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "tsd_h" + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
half_double_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
half_double_value = [match_id, league_id, "tsd_h", "0", 0, p_code, half_odd_even_even, '双',
|
|
|
@@ -400,7 +383,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + "tss_h" + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
half_single_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
half_single_value = [match_id, league_id, "tss_h", "0", 0, p_code, half_odd_even_odd, '单', odds_only,
|
|
|
@@ -420,7 +402,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + key + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
total_goals_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
total_goals_value = [match_id, league_id, key, "0", 0, p_code, value, total_dict[key], odds_only,
|
|
|
@@ -439,7 +420,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + key + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
half_fulls_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
half_fulls_value = [match_id, league_id, key, "0", 0, p_code, value, full_dict[key], odds_only,
|
|
|
@@ -464,7 +444,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + key + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
bodan_dict_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
bodan_dict_value = [match_id, league_id, key, "0", 0, p_code, value, bodan_dict[key], odds_only,
|
|
|
@@ -483,7 +462,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + key + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
first_last_balls_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds", "condition",
|
|
|
"odds_only", "sole", "source", "type", "team"]
|
|
|
first_last_balls_value = [match_id, league_id, key, "0", 0, p_code, value, first_last_dict[key], odds_only,
|
|
|
@@ -505,7 +483,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + key + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
full_dict_rules_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
|
|
|
"condition", "odds_only", "sole", "source", "type", "team"]
|
|
|
full_dict_rules_value = [match_id, league_id, key, "0", 0, p_code, value, full_dict_rules[key],
|
|
|
@@ -519,7 +496,6 @@ class Zuqiupipeline(object):
|
|
|
sole_str = p_code + key + '0' + str(match_id) + "hg3535"
|
|
|
odds_only = Helper.genearte_MD5(hash_str, pt)
|
|
|
sole = Helper.genearte_MD5(sole_str, pt)
|
|
|
- odds_onlys.append(odds_only)
|
|
|
half_dicts_key = ["match_id", "lg_id", "odds_code", "status", "sort", "p_code", "odds",
|
|
|
"condition","odds_only", "sole", "source", "type", "team"]
|
|
|
half_dicts_value = [match_id, league_id, key, "0", 0, p_code, value, half_dict_rules[key],
|