def _api_scrape(json_inp, ndx):

    try:
        headers = json_inp['resultSets'][ndx]['headers']
        values = json_inp['resultSets'][ndx]['rowSet']
    except KeyError:
        # This is so ugly but this is what you get when your data comes out
        # in not a standard format
        try:
            headers = json_inp['resultSet'][ndx]['headers']
            values = json_inp['resultSet'][ndx]['rowSet']
        except KeyError:
            # Added for results that only include one set (ex. LeagueLeaders)
            headers = json_inp['resultSet']['headers']
            values = json_inp['resultSet']['rowSet']
    if HAS_PANDAS:
        return DataFrame(values, columns=headers)
    else:
        # Taken from www.github.com/bradleyfay/py-goldsberry
        return [dict(zip(headers, value)) for value in values]
Web Component for identifying the original client IP when a reverse proxy is used
dataset/ETHPy150Open seemethere/nba_py/nba_py/__init__.py/_api_scrape--crossover with--dataset/ETHPy150Open circuits/circuits/circuits/web/tools.py/ReverseProxy.init