diff --git a/.travis.yml b/.travis.yml index a875cc5..e791739 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: python python: #- 2.6 - 2.7 - - 3.2 - 3.3 - 3.4 - 3.5 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b95f04f..486e446 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,7 +4,11 @@ Changelog --------- -0.1.10 (2016-?-?) +0.2.0 (2016-09-?) +++++++++++++++++++ +* fifa 17 & dump versions (thanks to rafaelget #192) + +0.1.10 (2016-04-30) ++++++++++++++++++ * fix python 3 compatibility #183 * bump client version for and/ios (fix #190 thanks to rafaelget) diff --git a/README.rst b/README.rst index fcf2387..36f49da 100644 --- a/README.rst +++ b/README.rst @@ -15,7 +15,7 @@ Documentation will be available soon at http://fut.readthedocs.org/. Players database: https://www.easports.com/uk/fifa/ultimate-team/fut/database -Players database (json): http://cdn.content.easports.com/fifa/fltOnlineAssets/B488919F-23B5-497F-9FC0-CACFB38863D0/2016/fut/items/web/players.json +Players database (json): http://cdn.content.easports.com/fifa/fltOnlineAssets/CC8267B6-0817-4842-BB6A-A20F88B05418/2017/fut/items/web/players.json diff --git a/fut/__init__.py b/fut/__init__.py index 590c952..a684f7c 100644 --- a/fut/__init__.py +++ b/fut/__init__.py @@ -23,7 +23,7 @@ """ __title__ = 'fut' -__version__ = '0.1.10' +__version__ = '0.2.0' __author__ = 'Piotr Staroszczyk' __author_email__ = 'piotr.staroszczyk@get24.org' __license__ = 'GNU GPL v3' diff --git a/fut/config.py b/fut/config.py index 0024852..04cf3fd 100644 --- a/fut/config.py +++ b/fut/config.py @@ -1,6 +1,6 @@ -# chrome 46 @ win10 +# chrome 53 @ win10 headers = { - 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.122 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Encoding': 'gzip,deflate,sdch', 'Accept-Language': 'en-US,en;q=0.8', @@ -36,6 +36,6 @@ # 'X-Requested-With': 'com.ea.fifaultimate_row', # ultimate app identifier? } -flash_agent = 'ShockwaveFlash/21.0.0.213' +flash_agent = 'ShockwaveFlash/23.0.0.162' cookies_file = 'cookies.txt' diff --git a/fut/core.py b/fut/core.py index 755efbb..2afab3c 100644 --- a/fut/core.py +++ b/fut/core.py @@ -198,15 +198,15 @@ def __login__(self, email, passwd, secret_answer, platform='pc', code=None, emul self.urls = urls(platform) # TODO: urls won't be loaded if we drop here if platform == 'pc': - game_sku = 'FFA16PCC' + game_sku = 'FFA17PCC' elif platform == 'xbox': - game_sku = 'FFA16XBO' + game_sku = 'FFA17XBO' elif platform == 'xbox360': - game_sku = 'FFA16XBX' + game_sku = 'FFA17XBX' elif platform == 'ps3': - game_sku = 'FFA16PS3' # not tested + game_sku = 'FFA17PS3' # not tested elif platform == 'ps4': - game_sku = 'FFA16PS4' + game_sku = 'FFA17PS4' platform = 'ps3' # ps4 not available? else: raise FutError(reason='Wrong platform. (Valid ones are pc/xbox/xbox360/ps3/ps4)') @@ -214,11 +214,11 @@ def __login__(self, email, passwd, secret_answer, platform='pc', code=None, emul # return True # no need to log in again # emulate if emulate == 'ios': - sku = 'FUT16IOS' - clientVersion = 20 + sku = 'FUT17IOS' + clientVersion = 21 elif emulate == 'and': - sku = 'FUT16AND' - clientVersion = 20 + sku = 'FUT17AND' + clientVersion = 21 # TODO: need more info about log in procedure in game # elif emulate == 'xbox': # sku = 'FFA16XBX' # FFA14CAP ? @@ -230,7 +230,7 @@ def __login__(self, email, passwd, secret_answer, platform='pc', code=None, emul # sku = '' # dunno # clientVersion = 1 elif not emulate: - sku = 'FUT16WEB' + sku = 'FUT17WEB' clientVersion = 1 else: raise FutError(reason='Invalid emulate parameter. (Valid ones are and/ios).') # pc/ps3/xbox/ diff --git a/fut/urls.py b/fut/urls.py index 7442998..f6a91c7 100644 --- a/fut/urls.py +++ b/fut/urls.py @@ -11,8 +11,8 @@ def __updateUrls__(urls, cl): urls['fut_config'] = '%s?cl=%s' % (urls['fut_config'], cl) rc = xmltodict.parse(requests.get(urls['fut_config']).content) services = rc['main']['services']['prod'] - path = '{0}{1}game/fifa16/'.format(urls['fut_host'], rc['main']['directHttpServiceDestination']) - path_auth = '{0}/iframe/fut16{1}'.format(urls['main_site'], rc['main']['httpServiceDestination']) + path = '{0}{1}game/fifa17/'.format(urls['fut_host'], rc['main']['directHttpServiceDestination']) + path_auth = '{0}/iframe/fut17{1}'.format(urls['main_site'], rc['main']['httpServiceDestination']) for i in services: if i == 'authentication': urls['fut'][i] = path_auth + services[i] @@ -25,27 +25,27 @@ def urls(platform, cl=None): """Return services urls.""" urls = { 'main_site': 'https://www.easports.com', - 'futweb': 'https://www.easports.com/iframe/fut16/?baseShowoffUrl=https%3A%2F%2Fwww.easports.com%2Ffifa%2Fultimate-team%2Fweb-app%2Fshow-off&guest_app_uri=http%3A%2F%2Fwww.easports.com%2Ffifa%2Fultimate-team%2Fweb-app&locale=en_US', - 'fut_config': 'https://www.easports.com/iframe/fut16/bundles/futweb/web/flash/xml/site_config.xml', # add timestamp + 'futweb': 'https://www.easports.com/iframe/fut17/?baseShowoffUrl=https%3A%2F%2Fwww.easports.com%2Ffifa%2Fultimate-team%2Fweb-app%2Fshow-off&guest_app_uri=http%3A%2F%2Fwww.easports.com%2Ffifa%2Fultimate-team%2Fweb-app&locale=en_US', + 'fut_config': 'https://www.easports.com/iframe/fut17/bundles/futweb/web/flash/xml/site_config.xml', # add timestamp 'fut_home': 'https://www.easports.com/uk/fifa/football-club/ultimate-team', 'fut': {}, # it's updated dynamicly (based on fut_config) - 'fut_question': 'https://www.easports.com/iframe/fut16/p/ut/game/fifa16/phishing/question', # add timestamp - 'fut_validate': 'https://www.easports.com/iframe/fut16/p/ut/game/fifa16/phishing/validate', - 'fut_captcha_img': 'https://www.easports.com/iframe/fut16/p/ut/captcha/img', # add timestamp - 'fut_captcha_validate': 'https://www.easports.com/iframe/fut16/p/ut/captcha/validate', - - 'fut_host': {'pc': 'https://utas.s2.fut.ea.com:443', - 'ps3': 'https://utas.s2.fut.ea.com:443', - 'ps4': 'https://utas.s2.fut.ea.com:443', - 'xbox': 'https://utas.s3.fut.ea.com:443', - 'xbox360': 'https://utas.s3.fut.ea.com:443', - 'ios': 'https://utas.fut.ea.com:443', - 'and': 'https://utas.fut.ea.com:443'}, - - 'shards': 'https://www.easports.com/iframe/fut16/p/ut/shards', # add timestamp - 'acc_info': 'https://www.easports.com/iframe/fut16/p/ut/game/fifa16/user/accountinfo', - 'card_info': 'https://fifa16.content.easports.com/fifa/fltOnlineAssets/B488919F-23B5-497F-9FC0-CACFB38863D0/2016/fut/items/web/', - 'messages': 'https://www.easports.com/iframe/fut16/bundles/futweb/web/flash/xml/localization/messages.en_GB.xml', # add cl + 'fut_question': 'https://www.easports.com/iframe/fut17/p/ut/game/fifa16/phishing/question', # add timestamp + 'fut_validate': 'https://www.easports.com/iframe/fut17/p/ut/game/fifa16/phishing/validate', + 'fut_captcha_img': 'https://www.easports.com/iframe/fut17/p/ut/captcha/img', # add timestamp + 'fut_captcha_validate': 'https://www.easports.com/iframe/fut17/p/ut/captcha/validate', + + 'fut_host': {'pc': 'https://utas.external.s2.fut.ea.com:443', + 'ps3': 'https://utas.external.s2.fut.ea.com:443', + 'ps4': 'https://utas.external.s2.fut.ea.com:443', + 'xbox': 'https://utas.external.s3.fut.ea.com:443', + 'xbox360': 'https://utas.external.s3.fut.ea.com:443', + 'ios': 'https://utas.external.fut.ea.com:443', + 'and': 'https://utas.external.fut.ea.com:443'}, + + 'shards': 'https://www.easports.com/iframe/fut17/p/ut/shards', # add timestamp + 'acc_info': 'https://www.easports.com/iframe/fut17/p/ut/game/fifa16/user/accountinfo', + 'card_info': 'https://fifa17.content.easports.com/fifa/fltOnlineAssets/B488919F-23B5-497F-9FC0-CACFB38863D0/2016/fut/items/web/', + 'messages': 'https://www.easports.com/iframe/fut17/bundles/futweb/web/flash/xml/localization/messages.en_US.xml', # add cl } # urls['login'] = requests.get(urls['fut_home']).url diff --git a/setup.py b/setup.py index f444523..b850ff1 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ __title__ = 'fut' -__version__ = '0.1.10' +__version__ = '0.2.0' __author__ = 'Piotr Staroszczyk' __author_email__ = 'piotr.staroszczyk@get24.org' __license__ = 'GNU GPL v3' @@ -56,7 +56,7 @@ 'Programming Language :: Python :: 3', # 'Programming Language :: Python :: 3.0', # not tested # 'Programming Language :: Python :: 3.1', # not tested - 'Programming Language :: Python :: 3.2', + # 'Programming Language :: Python :: 3.2', # dropped due requests incomapitibility 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5',