Example #1
0
def createLineups(statusMap, weekId):
	for userId in statusMap.keys():
		print str(statusMap[userId])
		players = []
		for positionKey in statusMap[userId].keys():
			if positionKey in ['QB', 'RB', 'WR']:
				for player in statusMap[userId][positionKey]:
					players.append(player)
		auctionDb.setNewLineup(userId, weekId, players)
Example #2
0
def createLineups(statusMap, weekId):
    for userId in statusMap.keys():
        print str(statusMap[userId])
        players = []
        for positionKey in statusMap[userId].keys():
            if positionKey in ['QB', 'RB', 'WR']:
                for player in statusMap[userId][positionKey]:
                    players.append(player)
        auctionDb.setNewLineup(userId, weekId, players)
Example #3
0
def main():
	parser = OptionParser()
	parser.add_option('-w', '--week', dest='week',
        help='enter week to scrape stats for')
	(options, args) = parser.parse_args()
	keepers = auctionDb.getAllKeepers(options.week)
	for keeper in keepers:
		auctionDb.placeBid(keeper['user_id'], keeper['player_id'], keeper['bid_amount'], int(options.week) + 1)
		auctionDb.setNewLineup(keeper['user_id'], int(options.week) + 1, [keeper['player_id']])