__author__ = 'John Sabath' from tabulate import tabulate from fantasylcs import FantasyLCS fantasy_lcs = FantasyLCS(season_id=12) fantasy_lcs.load() table = [] for team in fantasy_lcs.get_teams(): stats = team.get_season_stats() row = [ team.get_name(), stats['matchesPlayed']['actual'], stats['matchVictory']['actual'], stats['matchDefeat']['actual'], stats['secondsPlayed']['actual'], stats['firstBlood']['actual'], stats['towerKills']['actual'], stats['dragonKills']['actual'], stats['baronKills']['actual'], stats['quickWinBonus']['actual'], ] table.append(row) table.sort(key=lambda x: x[0].lower()) print(tabulate(table, headers=["Name", "Matches Played", "W", "L", "Secs Played", "1st B", "Tw", "Dr", "Ba", "<30m W"]))
__author__ = 'John Sabath' from tabulate import tabulate from fantasylcs import FantasyLCS fantasy_lcs = FantasyLCS(season_id=12) fantasy_lcs.load() table = [] for player in fantasy_lcs.get_players(): stats = player.get_season_stats() row = [ player.get_name(), stats['matchesPlayed']['actual'], stats['kills']['actual'], stats['deaths']['actual'], stats['assists']['actual'], stats['minionKills']['actual'], stats['doubleKills']['actual'], stats['tripleKills']['actual'], stats['quadraKills']['actual'], stats['pentaKills']['actual'], stats['killOrAssistBonus']['actual'], ] table.append(row) table.sort(key=lambda x: x[0].lower()) print(tabulate(table, headers=["Name", "Matches Played", "K", "D", "A", "CS", "2x", "3x", "4x", "5x", "10+ K/A"]))
__author__ = 'John' import pickle import datetime import time from lolfantasybot import reddit from fantasylcs import FantasyLCS fantasylcs = FantasyLCS(season_id=12) fantasylcs.load() completed_matches = [] # # Initialize completed matches list, so that we don't make duplicate threads # for match in fantasylcs.get_matches(): utc_now = datetime.datetime.utcnow() if match.get_datetime().naive < utc_now and match.is_completed(): completed_matches.append(match.get_id()) # # Main loop # running = True while running: try: fantasylcs.load()
__author__ = 'John Sabath' from tabulate import tabulate from fantasylcs import FantasyLCS fantasy_lcs = FantasyLCS(season_id=12) fantasy_lcs.load() table = [] for match in fantasy_lcs.get_matches(): row = [ "Week %d" % match.get_week(), match.get_datetime().to('local').format("MMM D, h:mm A"), fantasy_lcs.get_team(match.get_blue_team_id()).get_name(), fantasy_lcs.get_team(match.get_red_team_id()).get_name(), "Y" if match.is_completed() else "N" ] table.append(row) print(tabulate(table, headers=["Week", "Date", "Blue Team", "Red Team", "Completed"]))