sportsref/nfl/finders/PSF.py
def PlayerSeasonFinder(**kwargs):
    """ Docstring will be filled in by __init__.py """

    if 'offset' not in kwargs:
        kwargs['offset'] = 0

    playerSeasons = []
    while True:
        querystring = _kwargs_to_qs(**kwargs)
        url = '{}?{}'.format(PSF_URL, querystring)
        if kwargs.get('verbose', False):
            print(url)
        html = utils.get_html(url)
        doc = pq(html)
        table = doc('table#results')
        df = utils.parse_table(table)
        if df.empty:
            break

        thisSeason = list(zip(df.player_id, df.year))
        playerSeasons.extend(thisSeason)

        if doc('*:contains("Next Page")'):
            kwargs['offset'] += 100
        else:
            break

    return playerSeasons
def PlayerSeasonFinder(**kwargs):
    """ Docstring will be filled in by __init__.py """

    if 'offset' not in kwargs:
        kwargs['offset'] = 0

    playerSeasons = []
    while True:
        querystring = _kwargs_to_qs(**kwargs)
        url = '{}?{}'.format(PSF_URL, querystring)
        if kwargs.get('verbose', False):
            print(url)
        html = utils.get_html(url)
        doc = pq(html)
        table = doc('table#results')
        df = utils.parse_table(table)
        if df.empty:
            break

        thisSeason = list(zip(df.player_id, df.year))
        playerSeasons.extend(thisSeason)

        if doc('*:contains("Next Page")'):
            kwargs['offset'] += 100
        else:
            break

    return playerSeasons
def PlayerSeasonFinder ( * * kwargs ) : if 'offset' not in kwargs : kwargs [ 'offset' ] = 0 playerSeasons = [ ] while True : querystring = _kwargs_to_qs ( * * kwargs ) url = '{}?{}' . format ( PSF_URL , querystring ) if kwargs . get ( 'verbose' , False ) : print ( url ) html = utils . get_html ( url ) doc = pq ( html ) table = doc ( 'table#results' ) df = utils . parse_table ( table ) if df . empty : break thisSeason = list ( zip ( df . player_id , df . year ) ) playerSeasons . extend ( thisSeason ) if doc ( '*:contains("Next Page")' ) : kwargs [ 'offset' ] += 100 else : break return playerSeasons
Docstring will be filled in by __init__.py
Docstring will be filled in by __init__ . py