diff --git a/espn_api/requests/espn_requests.py b/espn_api/requests/espn_requests.py index 97bf011d..5247826d 100644 --- a/espn_api/requests/espn_requests.py +++ b/espn_api/requests/espn_requests.py @@ -1,4 +1,5 @@ import requests +import json from .constant import FANTASY_BASE_ENDPOINT, FANTASY_SPORTS from ..utils.logger import Logger @@ -71,7 +72,9 @@ def get_pro_players(self): params = { 'view': 'players_wl' } - data = self.get(extend='/players', params=params) + filters = {"filterActive":{"value":True}} + headers = {'x-fantasy-filter': json.dumps(filters)} + data = self.get(extend='/players', params=params, headers=headers) return data def get_league_draft(self): diff --git a/setup.py b/setup.py index b103ba79..4cd172d4 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='espn_api', packages=find_packages(), - version='0.4.0', + version='0.4.1', author='Christian Wendt', description='ESPN API', install_requires=['requests>=2.0.0,<3.0.0'],