def get_play_by_plays(triples): """quickly makes an itterator of playbyplays from a list of (url, hometeam, awayteam)""" triples = list(triples) return map( lambda x: playByPlays(x[0], x[1], x[2]), zip( scraper.soup_links(map(lambda x: x[0], triples), 50, 0), map(lambda x: x[1], triples), map(lambda x: x[2], triples), ), )
def get_game_pages(urlList, baseUrl, league=None): """quickly makes game pages from a list or urls""" exp = re.compile(r"date=(\d+)") urlList = list(urlList) return map( lambda x: gamePage(x[0], exp.search(x[1]).group(1), baseUrl, x[2], league), zip( scraper.soup_links(map(lambda y: y[0], urlList), 40, 0), map(lambda y: y[0], urlList), map(lambda y: y[1], urlList), ), )