|
@@ -284,13 +284,8 @@ class Zuqiupipeline(object):
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
zq_odds.append(payload)
|
|
zq_odds.append(payload)
|
|
|
- # b = json.dumps(zq_odds)
|
|
|
|
|
- # print(json.dumps(zq_odds))
|
|
|
|
|
r = requests.post(url, data={"data": json.dumps(zq_odds)})
|
|
r = requests.post(url, data={"data": json.dumps(zq_odds)})
|
|
|
print(r.text)
|
|
print(r.text)
|
|
|
- # print(len(zq_odds))
|
|
|
|
|
- # print(zq_odds)
|
|
|
|
|
- # print(zq_competitions)
|
|
|
|
|
return item
|
|
return item
|
|
|
|
|
|
|
|
|
|
|
|
@@ -298,6 +293,8 @@ class Zuqiupipeline(object):
|
|
|
class Lanqiupipeline(object):
|
|
class Lanqiupipeline(object):
|
|
|
def process_item(self, item, spider):
|
|
def process_item(self, item, spider):
|
|
|
# 使用twisted将mysql插入变成异步执行
|
|
# 使用twisted将mysql插入变成异步执行
|
|
|
|
|
+ lq_odds = []
|
|
|
|
|
+ url = 'http://admin.5gogo.com/setSports'
|
|
|
logger = logging.getLogger(__name__)
|
|
logger = logging.getLogger(__name__)
|
|
|
# # logger.warning(query.addErrback(self.handle_error, item, spider))
|
|
# # logger.warning(query.addErrback(self.handle_error, item, spider))
|
|
|
# 联赛id
|
|
# 联赛id
|
|
@@ -362,104 +359,109 @@ class Lanqiupipeline(object):
|
|
|
if concedes_dict:
|
|
if concedes_dict:
|
|
|
for key, value in concedes_dict.items():
|
|
for key, value in concedes_dict.items():
|
|
|
two_post(data=value, match_id=game_id, odds_code=key, p_id=1,
|
|
two_post(data=value, match_id=game_id, odds_code=key, p_id=1,
|
|
|
- league_id=league_id, p_code='concede', condition=concedes_dict_rule[key], game_code='lq')
|
|
|
|
|
|
|
+ league_id=league_id, p_code='concede', condition=concedes_dict_rule[key], game_code='lq', zq_odds=lq_odds)
|
|
|
if odd_evens_dict:
|
|
if odd_evens_dict:
|
|
|
for key, value in odd_evens_dict.items():
|
|
for key, value in odd_evens_dict.items():
|
|
|
two_post(data=value, match_id=game_id, odds_code=key, p_id=2,
|
|
two_post(data=value, match_id=game_id, odds_code=key, p_id=2,
|
|
|
- league_id=league_id, p_code='two_sides', condition=odd_evens_dict_rule[key], game_code='lq')
|
|
|
|
|
|
|
+ league_id=league_id, p_code='two_sides', condition=odd_evens_dict_rule[key], game_code='lq', zq_odds=lq_odds)
|
|
|
# 总分单双 数据插入数据库
|
|
# 总分单双 数据插入数据库
|
|
|
if total_sizes_dict:
|
|
if total_sizes_dict:
|
|
|
for key, value in total_sizes_dict.items():
|
|
for key, value in total_sizes_dict.items():
|
|
|
two_post(data=value, match_id=game_id, odds_code=key, p_id=3,
|
|
two_post(data=value, match_id=game_id, odds_code=key, p_id=3,
|
|
|
- league_id=league_id, p_code='total_size', condition=total_sizes_dict_rule[key], game_code='lq')
|
|
|
|
|
|
|
+ league_id=league_id, p_code='total_size', condition=total_sizes_dict_rule[key], game_code='lq', zq_odds=lq_odds)
|
|
|
# 全场总分大小 数据插入数据库
|
|
# 全场总分大小 数据插入数据库
|
|
|
# 全场总分大小 数据插入数据库
|
|
# 全场总分大小 数据插入数据库
|
|
|
if team_scores_dict:
|
|
if team_scores_dict:
|
|
|
for key, value in team_scores_dict.items():
|
|
for key, value in team_scores_dict.items():
|
|
|
two_post(data=value, match_id=game_id, odds_code=key, p_id=6,
|
|
two_post(data=value, match_id=game_id, odds_code=key, p_id=6,
|
|
|
- league_id=league_id, p_code='total_size', condition=team_scores_dict_rule[key], game_code='lq')
|
|
|
|
|
|
|
+ league_id=league_id, p_code='total_size', condition=team_scores_dict_rule[key], game_code='lq', zq_odds=lq_odds)
|
|
|
if last_numbers_dict['last_home']:
|
|
if last_numbers_dict['last_home']:
|
|
|
for key, value in last_numbers_dict['last_home'].items():
|
|
for key, value in last_numbers_dict['last_home'].items():
|
|
|
one_post(data=value, match_id=game_id, odds_code="last_home" + key, p_id=4,
|
|
one_post(data=value, match_id=game_id, odds_code="last_home" + key, p_id=4,
|
|
|
- league_id=league_id, p_code='team_score', condition=key, game_code='lq')
|
|
|
|
|
|
|
+ league_id=league_id, p_code='team_score', condition=key, game_code='lq', zq_odds=lq_odds)
|
|
|
if last_numbers_dict['last_guest']:
|
|
if last_numbers_dict['last_guest']:
|
|
|
for key, value in last_numbers_dict['last_guest'].items():
|
|
for key, value in last_numbers_dict['last_guest'].items():
|
|
|
one_post(data=value, match_id=game_id, odds_code="last_guest" + key, p_id=4,
|
|
one_post(data=value, match_id=game_id, odds_code="last_guest" + key, p_id=4,
|
|
|
- league_id=league_id, p_code='team_score', condition=key, game_code='lq')
|
|
|
|
|
|
|
+ league_id=league_id, p_code='team_score', condition=key, game_code='lq', zq_odds=lq_odds)
|
|
|
|
|
+ three_post(data=capots_dict, match_id=game_id, p_id=5, league_id=league_id, p_code='capot', condition=None, game_code='lq', zq_odds=lq_odds)
|
|
|
match_date, match_time, time3 = new_time(ctime)
|
|
match_date, match_time, time3 = new_time(ctime)
|
|
|
n_time = out_time(time3, 1.5)
|
|
n_time = out_time(time3, 1.5)
|
|
|
us_time = ctime
|
|
us_time = ctime
|
|
|
if lanqiu == "篮球":
|
|
if lanqiu == "篮球":
|
|
|
- if pt == 1:
|
|
|
|
|
- payload = {
|
|
|
|
|
- "game_code": "lq",
|
|
|
|
|
- "title": "competition",
|
|
|
|
|
- "data": {
|
|
|
|
|
- "home_team": team_home,
|
|
|
|
|
- "guest_team": team_guest,
|
|
|
|
|
- "lg_id": league_id,
|
|
|
|
|
- "status": 0,
|
|
|
|
|
- "match_id": game_id,
|
|
|
|
|
- "match_date": match_date,
|
|
|
|
|
- "match_time": match_time,
|
|
|
|
|
- "tag": number,
|
|
|
|
|
- "source": "hg3535",
|
|
|
|
|
- "is_rollball": 0,
|
|
|
|
|
- "is_today": 1,
|
|
|
|
|
- "is_morningplate": 0,
|
|
|
|
|
- "is_stringscene": 0,
|
|
|
|
|
- "us_time": us_time
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if pt == 1:
|
|
|
|
|
+ payload = {
|
|
|
|
|
+ "game_code": "lq",
|
|
|
|
|
+ "title": "competition",
|
|
|
|
|
+ "data": {
|
|
|
|
|
+ "home_team": team_home,
|
|
|
|
|
+ "guest_team": team_guest,
|
|
|
|
|
+ "lg_id": league_id,
|
|
|
|
|
+ "status": 0,
|
|
|
|
|
+ "match_id": game_id,
|
|
|
|
|
+ "match_date": match_date,
|
|
|
|
|
+ "match_time": match_time,
|
|
|
|
|
+ "tag": number,
|
|
|
|
|
+ "source": "hg3535",
|
|
|
|
|
+ "is_rollball": 0,
|
|
|
|
|
+ "is_today": 1,
|
|
|
|
|
+ "is_morningplate": 0,
|
|
|
|
|
+ "is_stringscene": 0,
|
|
|
|
|
+ "us_time": us_time
|
|
|
}
|
|
}
|
|
|
- if pt == 2:
|
|
|
|
|
- payload = {
|
|
|
|
|
- "game_code": "lq",
|
|
|
|
|
- "title": "competition",
|
|
|
|
|
- "data": {
|
|
|
|
|
- "home_team": team_home,
|
|
|
|
|
- "guest_team": team_guest,
|
|
|
|
|
- "lg_id": league_id,
|
|
|
|
|
- "status": 0,
|
|
|
|
|
- "match_id": game_id,
|
|
|
|
|
- "match_date": match_date,
|
|
|
|
|
- "match_time": match_time,
|
|
|
|
|
- "tag": number,
|
|
|
|
|
- "source": "hg3535",
|
|
|
|
|
- "is_rollball": 0,
|
|
|
|
|
- "is_today": 0,
|
|
|
|
|
- "is_morningplate": 1,
|
|
|
|
|
- "is_stringscene": 0,
|
|
|
|
|
- "us_time": us_time
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if pt == 2:
|
|
|
|
|
+ payload = {
|
|
|
|
|
+ "game_code": "lq",
|
|
|
|
|
+ "title": "competition",
|
|
|
|
|
+ "data": {
|
|
|
|
|
+ "home_team": team_home,
|
|
|
|
|
+ "guest_team": team_guest,
|
|
|
|
|
+ "lg_id": league_id,
|
|
|
|
|
+ "status": 0,
|
|
|
|
|
+ "match_id": game_id,
|
|
|
|
|
+ "match_date": match_date,
|
|
|
|
|
+ "match_time": match_time,
|
|
|
|
|
+ "tag": number,
|
|
|
|
|
+ "source": "hg3535",
|
|
|
|
|
+ "is_rollball": 0,
|
|
|
|
|
+ "is_today": 0,
|
|
|
|
|
+ "is_morningplate": 1,
|
|
|
|
|
+ "is_stringscene": 0,
|
|
|
|
|
+ "us_time": us_time
|
|
|
}
|
|
}
|
|
|
- if pt == 3:
|
|
|
|
|
- payload = {
|
|
|
|
|
- "game_code": "lq",
|
|
|
|
|
- "title": "competition",
|
|
|
|
|
- "data": {
|
|
|
|
|
- "home_team": team_home,
|
|
|
|
|
- "guest_team": team_guest,
|
|
|
|
|
- "lg_id": league_id,
|
|
|
|
|
- "status": 0,
|
|
|
|
|
- "match_id": game_id,
|
|
|
|
|
- "match_date": match_date,
|
|
|
|
|
- "match_time": match_time,
|
|
|
|
|
- "tag": number,
|
|
|
|
|
- "source": "hg3535",
|
|
|
|
|
- "is_rollball": 0,
|
|
|
|
|
- "is_today": 0,
|
|
|
|
|
- "is_morningplate": 0,
|
|
|
|
|
- "is_stringscene": 1,
|
|
|
|
|
- "us_time": us_time
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ if pt == 3:
|
|
|
|
|
+ payload = {
|
|
|
|
|
+ "game_code": "lq",
|
|
|
|
|
+ "title": "competition",
|
|
|
|
|
+ "data": {
|
|
|
|
|
+ "home_team": team_home,
|
|
|
|
|
+ "guest_team": team_guest,
|
|
|
|
|
+ "lg_id": league_id,
|
|
|
|
|
+ "status": 0,
|
|
|
|
|
+ "match_id": game_id,
|
|
|
|
|
+ "match_date": match_date,
|
|
|
|
|
+ "match_time": match_time,
|
|
|
|
|
+ "tag": number,
|
|
|
|
|
+ "source": "hg3535",
|
|
|
|
|
+ "is_rollball": 0,
|
|
|
|
|
+ "is_today": 0,
|
|
|
|
|
+ "is_morningplate": 0,
|
|
|
|
|
+ "is_stringscene": 1,
|
|
|
|
|
+ "us_time": us_time
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+ lq_odds.append(payload)
|
|
|
|
|
+ r = requests.post(url, data={"data": json.dumps(lq_odds)})
|
|
|
|
|
+ print(r.text)
|
|
|
|
|
|
|
|
|
|
|
|
|
# 网球 让球&大小盘--------------------------------------------------------------------------------------------------------
|
|
# 网球 让球&大小盘--------------------------------------------------------------------------------------------------------
|
|
|
class Wangqiupipeline(object):
|
|
class Wangqiupipeline(object):
|
|
|
def process_item(self, item, spider):
|
|
def process_item(self, item, spider):
|
|
|
|
|
+ wq_odds = []
|
|
|
logger = logging.getLogger(__name__)
|
|
logger = logging.getLogger(__name__)
|
|
|
- url = 'http://sports.5gogo.com/Sports/WriteSports/setSports'
|
|
|
|
|
|
|
+ url = 'http://admin.5gogo.com/setSports'
|
|
|
# logger.warning(query.addErrback(self.handle_error, item, spider))
|
|
# logger.warning(query.addErrback(self.handle_error, item, spider))
|
|
|
# 联赛id
|
|
# 联赛id
|
|
|
league_id = item['league_id']
|
|
league_id = item['league_id']
|
|
@@ -598,29 +600,32 @@ class Wangqiupipeline(object):
|
|
|
"us_time": us_time
|
|
"us_time": us_time
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- resp = requests.post(url, data={"data": json.dumps(payload)})
|
|
|
|
|
- print(json.dumps(payload))
|
|
|
|
|
- print(resp.text)
|
|
|
|
|
|
|
+ # resp = requests.post(url, data={"data": json.dumps(payload)})
|
|
|
|
|
+ # print(json.dumps(payload))
|
|
|
|
|
+ # print(resp.text)
|
|
|
|
|
+ wq_odds.append(payload)
|
|
|
# 让盘
|
|
# 让盘
|
|
|
if concedes_dict:
|
|
if concedes_dict:
|
|
|
for key, value in concedes_dict.items():
|
|
for key, value in concedes_dict.items():
|
|
|
one_post(data=value, match_id=game_id, odds_code=key, p_id=1,
|
|
one_post(data=value, match_id=game_id, odds_code=key, p_id=1,
|
|
|
- league_id=league_id, p_code='concede', condition=fuhao(str(concedes_dict_rule[key])), game_code='wq')
|
|
|
|
|
|
|
+ league_id=league_id, p_code='concede', condition=fuhao(str(concedes_dict_rule[key])), game_code='wq', zq_odds=wq_odds)
|
|
|
# 让局
|
|
# 让局
|
|
|
if bureaus_dict:
|
|
if bureaus_dict:
|
|
|
for key, value in bureaus_dict.items():
|
|
for key, value in bureaus_dict.items():
|
|
|
one_post(data=value, match_id=game_id, odds_code=key, p_id=3,
|
|
one_post(data=value, match_id=game_id, odds_code=key, p_id=3,
|
|
|
- league_id=league_id, p_code='bureau', condition=fuhao(str(bureaus_dict_rule[key])), game_code='wq')
|
|
|
|
|
|
|
+ league_id=league_id, p_code='bureau', condition=fuhao(str(bureaus_dict_rule[key])), game_code='wq', zq_odds=wq_odds)
|
|
|
if total_number_dict:
|
|
if total_number_dict:
|
|
|
for key, value in total_number_dict.items():
|
|
for key, value in total_number_dict.items():
|
|
|
- one_post(data=value, match_id=game_id, odds_code=key, p_id=4, league_id=league_id, p_code='total_number', condition=key, game_code='wq')
|
|
|
|
|
|
|
+ one_post(data=value, match_id=game_id, odds_code=key, p_id=4, league_id=league_id, p_code='total_number', condition=total_number_dict_rule[key], game_code='wq', zq_odds=wq_odds)
|
|
|
if odd_evens_dict:
|
|
if odd_evens_dict:
|
|
|
for key, value in odd_evens_dict.items():
|
|
for key, value in odd_evens_dict.items():
|
|
|
one_post(data=value, match_id=game_id, odds_code=key, p_id=5, league_id=league_id,
|
|
one_post(data=value, match_id=game_id, odds_code=key, p_id=5, league_id=league_id,
|
|
|
- p_code='two_game_sides', condition=key, game_code='wq')
|
|
|
|
|
|
|
+ p_code='two_sides', condition=odd_evens_dict_rule[key], game_code='wq', zq_odds=wq_odds)
|
|
|
if kemps_dict:
|
|
if kemps_dict:
|
|
|
for key, value in kemps_dict.items():
|
|
for key, value in kemps_dict.items():
|
|
|
- one_post(data=value, match_id=game_id, odds_code=key, p_id=2, league_id=league_id, p_code='kemp', condition=key, game_code='wq')
|
|
|
|
|
|
|
+ one_post(data=value, match_id=game_id, odds_code=key, p_id=2, league_id=league_id, p_code='kemp', condition=key, game_code='wq', zq_odds=wq_odds)
|
|
|
|
|
+ r = requests.post(url, data={"data": json.dumps(wq_odds)})
|
|
|
|
|
+ print(r.text)
|
|
|
return item
|
|
return item
|
|
|
|
|
|
|
|
|
|
|
|
@@ -628,7 +633,8 @@ class Wangqiupipeline(object):
|
|
|
class Wqbodanpipeline(object):
|
|
class Wqbodanpipeline(object):
|
|
|
def process_item(self, item, spider):
|
|
def process_item(self, item, spider):
|
|
|
# 使用twisted将mysql插入变成异步执行
|
|
# 使用twisted将mysql插入变成异步执行
|
|
|
- url = 'http://sports.5gogo.com/Sports/WriteSports/setSports'
|
|
|
|
|
|
|
+ wb_odds = []
|
|
|
|
|
+ url = 'http://admin.5gogo.com/setSports'
|
|
|
logger = logging.getLogger(__name__)
|
|
logger = logging.getLogger(__name__)
|
|
|
# logger.warning(query.addErrback(self.handle_error, item, spider))
|
|
# logger.warning(query.addErrback(self.handle_error, item, spider))
|
|
|
# 比赛日期
|
|
# 比赛日期
|
|
@@ -689,7 +695,10 @@ class Wqbodanpipeline(object):
|
|
|
if bodan_datas:
|
|
if bodan_datas:
|
|
|
for key, value in bodan_datas.items():
|
|
for key, value in bodan_datas.items():
|
|
|
one_post(data=value, match_id=competition_id, odds_code=key, p_id=2, league_id=league_id, p_code='bodan',
|
|
one_post(data=value, match_id=competition_id, odds_code=key, p_id=2, league_id=league_id, p_code='bodan',
|
|
|
- condition=bodan_dict[key], game_code='wq')
|
|
|
|
|
|
|
+ condition=bodan_dict[key], game_code='wq', zq_odds=wb_odds)
|
|
|
|
|
+ r = requests.post(url, data={"data": json.dumps(wb_odds)})
|
|
|
|
|
+ # logger.warning(r.text)
|
|
|
|
|
+ print(r.text)
|
|
|
return item
|
|
return item
|
|
|
|
|
|
|
|
|
|
|
|
@@ -698,7 +707,8 @@ class Bangqiupipeline(object):
|
|
|
def process_item(self, item, spider):
|
|
def process_item(self, item, spider):
|
|
|
# print(item)
|
|
# print(item)
|
|
|
logger = logging.getLogger(__name__)
|
|
logger = logging.getLogger(__name__)
|
|
|
- url = 'http://sports.5gogo.com/Sports/WriteSports/setSports'
|
|
|
|
|
|
|
+ bq_odds = []
|
|
|
|
|
+ url = 'http://admin.5gogo.com/setSports'
|
|
|
# logger.warning(query.addErrback(self.handle_error, item, spider))
|
|
# logger.warning(query.addErrback(self.handle_error, item, spider))
|
|
|
# 联赛id
|
|
# 联赛id
|
|
|
league_id = item['league_id']
|
|
league_id = item['league_id']
|
|
@@ -784,9 +794,6 @@ class Bangqiupipeline(object):
|
|
|
"us_time": us_time
|
|
"us_time": us_time
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- resp = requests.post(url, data={"data": json.dumps(payload)})
|
|
|
|
|
- print(json.dumps(payload))
|
|
|
|
|
- print(resp.text)
|
|
|
|
|
if pt == 2:
|
|
if pt == 2:
|
|
|
payload = {
|
|
payload = {
|
|
|
"game_code": "bq",
|
|
"game_code": "bq",
|
|
@@ -808,9 +815,6 @@ class Bangqiupipeline(object):
|
|
|
"us_time": us_time
|
|
"us_time": us_time
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- resp = requests.post(url, data={"data": json.dumps(payload)})
|
|
|
|
|
- print(json.dumps(payload))
|
|
|
|
|
- print(resp.text)
|
|
|
|
|
if pt == 3:
|
|
if pt == 3:
|
|
|
payload = {
|
|
payload = {
|
|
|
"game_code": "bq",
|
|
"game_code": "bq",
|
|
@@ -832,26 +836,29 @@ class Bangqiupipeline(object):
|
|
|
"us_time": us_time
|
|
"us_time": us_time
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- resp = requests.post(url, data={"data": json.dumps(payload)})
|
|
|
|
|
- print(json.dumps(payload))
|
|
|
|
|
- print(resp.text)
|
|
|
|
|
# 让球
|
|
# 让球
|
|
|
- three_post(data=concedes_dict, match_id=game_id, p_id=1, league_id=league_id, p_code='concede',condition=concedes_dict_rule, game_code='bq')
|
|
|
|
|
|
|
+ three_post(data=concedes_dict, match_id=game_id, p_id=1, league_id=league_id, p_code='concede',condition=concedes_dict_rule, game_code='bq', zq_odds=bq_odds)
|
|
|
# 总得分:大/小
|
|
# 总得分:大/小
|
|
|
three_post(data=total_size_dict, match_id=game_id, p_id=2, league_id=league_id, p_code='total_size',
|
|
three_post(data=total_size_dict, match_id=game_id, p_id=2, league_id=league_id, p_code='total_size',
|
|
|
- condition=total_size_dict_rule, game_code='bq')
|
|
|
|
|
|
|
+ condition=total_size_dict_rule, game_code='bq', zq_odds=bq_odds)
|
|
|
# 单双
|
|
# 单双
|
|
|
three_post(data=odd_evens_dict, match_id=game_id, p_id=3, league_id=league_id, p_code='two_sides',
|
|
three_post(data=odd_evens_dict, match_id=game_id, p_id=3, league_id=league_id, p_code='two_sides',
|
|
|
- condition=odd_evens_dict_rule, game_code='bq')
|
|
|
|
|
|
|
+ condition=odd_evens_dict_rule, game_code='bq', zq_odds=bq_odds)
|
|
|
# 插入独赢
|
|
# 插入独赢
|
|
|
if capots_dict:
|
|
if capots_dict:
|
|
|
for key, value in capots_dict.items():
|
|
for key, value in capots_dict.items():
|
|
|
- one_post(data=value, match_id=game_id, odds_code=key, p_id=4, league_id=league_id, p_code='capot', condition=None, game_code='bq')
|
|
|
|
|
|
|
+ one_post(data=value, match_id=game_id, odds_code=key, p_id=4, league_id=league_id, p_code='capot', condition=None, game_code='bq', zq_odds=bq_odds)
|
|
|
|
|
+ r = requests.post(url, data={"data": json.dumps(bq_odds)})
|
|
|
|
|
+ # logger.warning(r.text)
|
|
|
|
|
+ print(r.text)
|
|
|
return item
|
|
return item
|
|
|
|
|
|
|
|
|
|
+
|
|
|
# 足球 篮球 网球 棒球 冠军------------------------------------------------------------------------------------------------
|
|
# 足球 篮球 网球 棒球 冠军------------------------------------------------------------------------------------------------
|
|
|
class Guanjunpipeline(object):
|
|
class Guanjunpipeline(object):
|
|
|
def process_item(self, item, spider):
|
|
def process_item(self, item, spider):
|
|
|
|
|
+ gj_odds = []
|
|
|
|
|
+ url = 'http://admin.5gogo.com/setSports'
|
|
|
logger = logging.getLogger(__name__)
|
|
logger = logging.getLogger(__name__)
|
|
|
data_game = item['data_game'].replace('年', "-").replace('月', "-").replace('日', "")
|
|
data_game = item['data_game'].replace('年', "-").replace('月', "-").replace('日', "")
|
|
|
time_game = item['time_game']
|
|
time_game = item['time_game']
|
|
@@ -882,11 +889,18 @@ class Guanjunpipeline(object):
|
|
|
# s_hash = hash_func(league_id, league_name, ball, 0)
|
|
# s_hash = hash_func(league_id, league_name, ball, 0)
|
|
|
# url = 'http://sports.5gogo.com/Sports/WriteSports/setSports'
|
|
# url = 'http://sports.5gogo.com/Sports/WriteSports/setSports'
|
|
|
# 冠军赛事
|
|
# 冠军赛事
|
|
|
- gs_post(ball=ball, league_id=league_id, league_name=league_name, data_game=data_game)
|
|
|
|
|
|
|
+ gs = gs_post(ball=ball, league_id=league_id, league_name=league_name, data_game=data_game)
|
|
|
|
|
+ gj_odds.append(gs)
|
|
|
# 冠军赔率
|
|
# 冠军赔率
|
|
|
- go_post(ball=ball, league_id=league_id, new_champion=new_champion, new_league_name=new_league_name, value=champion_team, r_hash=r_hash, new_hash=new_hash, tema_home=tema_home)
|
|
|
|
|
|
|
+ go = go_post(ball=ball, league_id=league_id, new_champion=new_champion, new_league_name=new_league_name, value=champion_team, r_hash=r_hash, new_hash=new_hash, tema_home=tema_home)
|
|
|
|
|
+ gj_odds.append(go)
|
|
|
# 冠军联赛
|
|
# 冠军联赛
|
|
|
- guanl_post(ball=ball, league_name=league_name, league_id=league_id, time3=time3)
|
|
|
|
|
|
|
+ guanl = guanl_post(ball=ball, league_name=league_name, league_id=league_id, time3=time3)
|
|
|
|
|
+ gj_odds.append(guanl)
|
|
|
|
|
+
|
|
|
|
|
+ r = requests.post(url, data={"data": json.dumps(gj_odds)})
|
|
|
|
|
+ # logger.warning(r.text)
|
|
|
|
|
+ print(r.text)
|
|
|
|
|
|
|
|
|
|
|
|
|
# 足球 篮球 网球 棒球 联赛------------------------------------------------------------------------------------------------
|
|
# 足球 篮球 网球 棒球 联赛------------------------------------------------------------------------------------------------
|
|
@@ -1556,7 +1570,7 @@ class Roll_Banqiupipeline(object):
|
|
|
"title": "match_result",
|
|
"title": "match_result",
|
|
|
"data": {
|
|
"data": {
|
|
|
"home_team": team_home,
|
|
"home_team": team_home,
|
|
|
- "guest_team": team_home,
|
|
|
|
|
|
|
+ "guest_team": team_guest,
|
|
|
"lg_id": league_id,
|
|
"lg_id": league_id,
|
|
|
"home_rate": None,
|
|
"home_rate": None,
|
|
|
"guest_rate": None,
|
|
"guest_rate": None,
|