Beispiel #1
0
def appSaveMat(match_id):
    if(os.path.exists(str(match_id)+'.npy')):
      return 0
    m_match = spider.get_match(match_id)  
    #if isStart(m_match.match_time):
    #  return 0
    match_url = 'http://odds.500.com/fenxi/ouzhi-'+ str(match_id) +'.shtml'
    content   = spider.url_get(match_url,"gb2312")
    (home_url,away_url) = netdata.get_Team_url(content)
    #start
    Mat = []
    Odds_Vec     = netdata.get_now_all_odds(content)
    home_rv = BSc.getTeamMatDis(home_url,Odds_Vec[0],Odds_Vec[2],1)[0]
    away_rv = BSc.getTeamMatDis(away_url,Odds_Vec[2],Odds_Vec[0],0)[0]
    Pre_Vec_Home = home_rv.get_pre_vec()
    Pre_Vec_Away = away_rv.get_pre_vec()
    Betfair_Vec  = fm.getBetfairsth(match_id)[0]
    Company_Vec  = fm.getBetfairsth(match_id)[1]
    Home_EG_Vec  = [home_rv.get_average_goal(),0,away_rv.get_average_lose()]
    Away_EG_Vec  = [away_rv.get_average_goal(),0,home_rv.get_average_lose()]
    (home_this_goals,home_this_loses) = BSc.getTeamMatDis(home_url,Odds_Vec[0],Odds_Vec[2],1)[4:6]
    (away_this_goals,away_this_loses) = BSc.getTeamMatDis(away_url,Odds_Vec[2],Odds_Vec[0],0)[4:6]
    Home_VG_Vec  = [np.var(home_this_goals),0,np.var(away_this_loses)]
    Away_VG_Vec  = [np.var(away_this_goals),0,np.var(home_this_loses)]
    return [list(Pre_Vec_Home),list(Pre_Vec_Away),list(Odds_Vec),Betfair_Vec,Company_Vec,Home_EG_Vec,Away_EG_Vec,Home_VG_Vec,Away_VG_Vec]
Beispiel #2
0
def showMarket(match_id):
    (betfair_indexes, boss_wl, betfair_suggest) = fm.getBetfairsth(match_id)
    (asia_odds, asia_num) = fm.getAsialot(match_id)
    (bs_odds, bs_num) = fm.getBslot(match_id)
    (kelly_index, back_lot) = fm.getKelly(match_id)
    print '============== 指数分析📊 ================'
    print '🗽必发指数: ' + betfair_indexes[0] + ' ' + betfair_indexes[
        1] + ' ' + betfair_indexes[2]
    print '🙅庄家盈亏: ' + boss_wl[0] + ' ' + boss_wl[1] + ' ' + boss_wl[2]
    print '         ' + betfair_suggest[0]
    print '         ' + betfair_suggest[1]
    print '         ' + betfair_suggest[2]
    print '============== 亚盘盘口💰 ================'
    print '-----初始盘口:'
    print '♞澳门    : ' + asia_odds[2] + '  ' + asia_num[1] + '  ' + asia_odds[3]
    print '♜Bet365  : ' + asia_odds[6] + '  ' + asia_num[3] + '  ' + asia_odds[
        7]
    print '♕皇冠    : ' + asia_odds[10] + '  ' + asia_num[5] + '  ' + asia_odds[
        11]
    print '♝金宝博  : ' + asia_odds[14] + '  ' + asia_num[7] + '  ' + asia_odds[15]
    print '♟香港马会: ' + asia_odds[18] + '  ' + asia_num[9] + '  ' + asia_odds[19]
    print '-----即时盘口:'
    print '♞澳门    : ' + asia_odds[0] + '  ' + asia_num[0] + '  ' + asia_odds[1]
    print '♜Bet365  : ' + asia_odds[4] + '  ' + asia_num[2] + '  ' + asia_odds[
        5]
    print '♕皇冠    : ' + asia_odds[8] + '  ' + asia_num[4] + '  ' + asia_odds[9]
    print '♝金宝博  : ' + asia_odds[12] + '  ' + asia_num[6] + '  ' + asia_odds[13]
    print '♟香港马会: ' + asia_odds[16] + '  ' + asia_num[8] + '  ' + asia_odds[17]
    print '============== 大小盘口🗿 ================'
    print '-----初始盘口:'
    print '♞澳门    : ' + bs_odds[2] + '  ' + bs_num[1] + '  ' + bs_odds[3]
    print '♜Bet365  : ' + bs_odds[6] + '  ' + bs_num[3] + '  ' + bs_odds[7]
    print '♕皇冠    : ' + bs_odds[10] + '  ' + bs_num[5] + '  ' + bs_odds[11]
    print '♝金宝博  : ' + bs_odds[14] + '  ' + bs_num[7] + '  ' + bs_odds[15]
    print '♟香港马会: ' + bs_odds[18] + '  ' + bs_num[9] + '  ' + bs_odds[19]
    print '-----即时盘口:'
    print '♞澳门    : ' + bs_odds[0] + '  ' + bs_num[0] + '  ' + bs_odds[1]
    print '♜Bet365  : ' + bs_odds[4] + '  ' + bs_num[2] + '  ' + bs_odds[5]
    print '♕皇冠    : ' + bs_odds[8] + '  ' + bs_num[4] + '  ' + bs_odds[9]
    print '♝金宝博  : ' + bs_odds[12] + '  ' + bs_num[6] + '  ' + bs_odds[13]
    print '♟香港马会: ' + bs_odds[16] + '  ' + bs_num[8] + '  ' + bs_odds[17]
    print '============== 凯利指数💻 ================'
    print '初始: ' + '返还率: ' + back_lot[0] + ' ' + '凯利: ' + kelly_index[
        0] + ' ' + kelly_index[1] + ' ' + kelly_index[2]
    print '即时: ' + '返还率: ' + back_lot[1] + ' ' + '凯利: ' + kelly_index[
        3] + ' ' + kelly_index[4] + ' ' + kelly_index[5]