diff --git a/fut/core.py b/fut/core.py index 053b06c..66efcea 100644 --- a/fut/core.py +++ b/fut/core.py @@ -1104,7 +1104,7 @@ def bid(self, trade_id, bid, fast=False): return False # TODO: add exceptions data = {'bid': bid} try: - rc = self.__request__(method, url, data=json.dumps(data), params={'sku_b': self.sku_b}, fast=fast)[ + rc = self.__request__(method, url, data=json.dumps(data), params={'client': 'webcomp'}, fast=fast)[ 'auctionInfo'][0] except PermissionDenied: # too slow, somebody took it already :-( return False @@ -1308,7 +1308,7 @@ def sell(self, item_id, bid, buy_now, duration=3600, fast=False): # TODO: auto send to tradepile data = {'buyNowPrice': buy_now, 'startingBid': bid, 'duration': duration, 'itemData': {'id': item_id}} - rc = self.__request__(method, url, data=json.dumps(data), params={'sku_b': self.sku_b}) + rc = self.__request__(method, url, data=json.dumps(data)) if not fast: # tradeStatus check like webapp do self.tradeStatus(rc['id']) return rc['id'] diff --git a/fut/pin.py b/fut/pin.py index 3d602dd..eb1b243 100644 --- a/fut/pin.py +++ b/fut/pin.py @@ -35,7 +35,7 @@ def __init__(self, sku=None, sid='', nucleus_id=0, persona_id='', dob=False, pla self.sku = sku or re.search('enums.SKU.FUT="(.+?)"', rc).group(1) self.rel = release_type - self.gid = re.search('gid:([0-9]+?)', rc).group(1) + self.gid = int(re.search('gid:([0-9]+?)', rc).group(1)) self.plat = 'web' # where is it? WEB:? self.et = re.search('et:"(.+?)"', rc).group(1) self.pidt = re.search('pidt:"(.+?)"', rc).group(1) @@ -49,11 +49,11 @@ def __init__(self, sku=None, sid='', nucleus_id=0, persona_id='', dob=False, pla self.r.headers['x-ea-game-id-type'] = self.tidt self.r.headers['x-ea-taxv'] = self.taxv - self.custom = {"networkAccess": "G"} # wifi? + self.custom = {"networkAccess": "W"} # wifi? # TODO?: full boot process when there is no session (boot start) self.custom['service_plat'] = platform[:3] - self.s = 2 # event id | before "was sent" without session/persona/nucleus id so we can probably omit + self.s = 1 # event id | before "was sent" without session/persona/nucleus id so we can probably omit def __ts(self): # TODO: add ability to random something @@ -108,13 +108,13 @@ def send(self, events, fast=False): "custom": self.custom, "et": self.et, "events": events, - "gid": self.gid, # convert to int? + "gid": self.gid, "is_sess": self.sid != '', "loc": "en_US", "plat": self.plat, "rel": self.rel, "sid": self.sid, - "taxv": self.taxv, # convert to float? + "taxv": self.taxv, "tid": self.sku, "tidt": self.tidt, "ts_post": self.__ts(),