Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small changes in pinevents #444

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fut/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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']
Expand Down
10 changes: 5 additions & 5 deletions fut/pin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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(),
Expand Down