Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
oczkers committed Sep 26, 2016
2 parents 50fbf91 + ace3817 commit c290d32
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 40 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: python
python:
#- 2.6
- 2.7
- 3.2
- 3.3
- 3.4
- 3.5
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand Down
2 changes: 1 addition & 1 deletion fut/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 3 additions & 3 deletions fut/config.py
Original file line number Diff line number Diff line change
@@ -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',
Expand Down Expand Up @@ -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'
20 changes: 10 additions & 10 deletions fut/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,27 +198,27 @@ 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)')
# if self.r.get(self.urls['main_site']+'/fifa/api/isUserLoggedIn').json()['isLoggedIn']:
# 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 ?
Expand All @@ -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/
Expand Down
42 changes: 21 additions & 21 deletions fut/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit c290d32

Please sign in to comment.