From 1ec1149bb1ea98bcb593fb60d2e9df2537f62f27 Mon Sep 17 00:00:00 2001 From: Piotr Staroszczyk Date: Tue, 4 Oct 2016 12:34:44 +0200 Subject: [PATCH] init players db function (#197) --- fut/core.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fut/core.py b/fut/core.py index a451692..2b05d72 100644 --- a/fut/core.py +++ b/fut/core.py @@ -154,6 +154,16 @@ def teams(year=2017): return teams +def players(): + """Return all players in dict + ?? (id, r, n, f, l,) == (id, rank, nationality(?), first name, last name). ?? + """ + # TODO: convert json to nice dict/object + rc = requests.get('http://cdn.content.easports.com/fifa/fltOnlineAssets/CC8267B6-0817-4842-BB6A-A20F88B05418/2017/fut/items/web/players.json').json + # rc['Players'] # = list + # rc['LegendPlayers'] # = list + + class Core(object): def __init__(self, email, passwd, secret_answer, platform='pc', code=None, emulate=None, debug=False, cookies=cookies_file): self.credits = 0