Giter Site home page Giter Site logo

Comments (24)

Noxdzine avatar Noxdzine commented on May 29, 2024

Hi, you can use a assetId and rareflag to filter ;)

from fut.

ar23 avatar ar23 commented on May 29, 2024

Hi Noxdzine,

thanks for your response.
I already thought about assetId, but i wasn't able to get an ID for an item. It has always been set to 0. So I have to search for the error in my code.
for just printing the whole item information something like this should work find, shouldn't it?

items = fut.searchAuctions (criteria in here)

for item in items:
trade_id = item['tradeId']
....

print (fut.items)

Just curious about the variables and their declaration.... :S

I'm currently sitting behind a proxy so i cannot test that easy - will do later on.

thanks again :)

from fut.

ar23 avatar ar23 commented on May 29, 2024

isn't it the resource-id?

from fut.

oczkers avatar oczkers commented on May 29, 2024

assetId / baseId / maskedDefId == baseId(resource_id)

from fut.

ar23 avatar ar23 commented on May 29, 2024

thx oczkers.

so shouldnt I be able to just add an entry for asset-id='1234567' to the fut.searchAuctions query to just get maybe manager contracts (if the resource id from the manager contracts would be 1234567?

Or am I wrong?

Just wanted to maybe buy only manager contracts from a price range from 150 to 250. but I'm stucking like hell...

from fut.

oczkers avatar oczkers commented on May 29, 2024

sure, just provide ctype and assetId to get only specific cards

from fut.

ar23 avatar ar23 commented on May 29, 2024

hm...just gives me []

my code - simplified

items = fut.searchAuctions('development', assetId=1615613739, page_size=50)

for item in items:
trade_id = item['tradeId']
buy_now_price = item['buyNowPrice']
trade_state = item['tradeState']
bid_state = item['bidState']
starting_bid = item['startingBid']
item_id = item['id']
timestamp = item['timestamp'] # auction start
rating = item['rating']
asset_id = item['assetId']
resource_id = item['resourceId']
item_state = item['itemState']
rareflag = item['rareflag']
formation = item['formation']
injury_type = item['injuryType']
suspension = item['suspension']
contract = item['contract']
playStyle = item['playStyle'] # used only for players
discardValue = item['discardValue']
itemType = item['itemType']
owners = item['owners']
offers = item['offers']
current_bid = item['currentBid']
expires = item['expires'] # seconds left

print items

as mentioned i got those ids from the resource-id fields....

from fut.

ar23 avatar ar23 commented on May 29, 2024

any idea why this doesnt give me an output? cant find an error. :(((

from fut.

oczkers avatar oczkers commented on May 29, 2024

maybe there is no opened auctions?

from fut.

mvillarejo avatar mvillarejo commented on May 29, 2024

Hello,

using debug I compared my request with the actual request done from the
webapp... and the only difference was the order of the params... I haven't
tried yet because it seems 'not the reason' but oko do you think that's
relevant in search query?

Regards

On 12 February 2014 12:56, Piotr Staroszczyk [email protected]:

maybe there is no opened auctions?

Reply to this email directly or view it on GitHubhttps://github.com//issues/43#issuecomment-34861975
.

Manuel Villarejo
e: [email protected] [email protected]

AVISO LEGAL
Este mensaje va dirigido exclusivamente a su destinatario y es
confidencial. Si por error lo recibe, por favor, comuníquelo por esta vía y
elimínelo. Cualquier uso de este mensaje o sus anexos sin autorización está
prohibida por ley.

LEGAL NOTICE
This message is intended to be read exclusively by the addressee and is
confidential. Should you receive it by error, please contact the sender by
email and delete it. Any use of this message or its attachments without due
authorisation is prohibited by law.

from fut.

oczkers avatar oczkers commented on May 29, 2024

proper question is: do every browser send parameters in proper order and is it good idea to detect bots/etc based on this issue?
If they're checking parameters order we should get identical error on every request, so in my opinion it's irrelevant.

@ar23 if you're getting empty response without error it's 99% sure that there is just no open auction.

from fut.

mvillarejo avatar mvillarejo commented on May 29, 2024

proper answer is: I do not know that from every browser but using the same
call I get auctions from web app and I do not get any from our API.

thanks

On 12 February 2014 15:36, Piotr Staroszczyk [email protected]:

proper question is: do every browser send parameters in proper order and
is it good idea to detect bots/etc based on this issue?
If they're checking parameters order we should get identical error on
every request, so in my opinion it's irrelevant.

@ar23 https://github.com/ar23 if you're getting empty response without
error it's 99% sure that there is just no open auction.

Reply to this email directly or view it on GitHubhttps://github.com//issues/43#issuecomment-34874008
.

Manuel Villarejo
e: [email protected] [email protected]

AVISO LEGAL
Este mensaje va dirigido exclusivamente a su destinatario y es
confidencial. Si por error lo recibe, por favor, comuníquelo por esta vía y
elimínelo. Cualquier uso de este mensaje o sus anexos sin autorización está
prohibida por ley.

LEGAL NOTICE
This message is intended to be read exclusively by the addressee and is
confidential. Should you receive it by error, please contact the sender by
email and delete it. Any use of this message or its attachments without due
authorisation is prohibited by law.

from fut.

ar23 avatar ar23 commented on May 29, 2024

no opened auction is very unlikely, the provided id should be the asset-Id of rare gold manager contracts. but maybe I did something wrong when extracting some assed IDs...

from fut.

oczkers avatar oczkers commented on May 29, 2024

@ar23 like i said previously:
assetId / baseId / maskedDefId == **baseId(**resource_id)

fut14.baseId(1615613739)
5001003

from fut.

ar23 avatar ar23 commented on May 29, 2024

ah...got it. sorry...my mistake. thanks a lot.

so something like this should print me the calculated assetId?

test = fut14.baseId(1615613739)

print (test)

thx again

from fut.

ar23 avatar ar23 commented on May 29, 2024

if someone would like to do this just with a calculator.... :)
BaseId = ResourceId - (2^30 + (2^28 * 2))
ResourceId = BaseId + 2^30 + (2^28 * 2)

from fut.

ar23 avatar ar23 commented on May 29, 2024

now i mostly get this errors when running my script. but sometimes it works...so there should not be a syntax error or sth. like that...

Traceback (most recent call last):
File "C:\Temp\fut14-master\itemsearch_a.py", line 33, in
bidding = fut.bid(trade_id, 200)
File "C:\Temp\fut14-master\fut14\core.py", line 326, in bid
rc = self.put(url, data=json.dumps(data))['auctionInfo'][0]
File "C:\Temp\fut14-master\fut14\core.py", line 259, in put
return self.request('PUT', url, _args, *_kwargs)
File "C:\Temp\fut14-master\fut14\core.py", line 241, in request
raise UnknownError(rc.str())
fut14.exceptions.UnknownError: {'code': '460', 'debug': '', 'reason': '', 'strin
g': 'Bad Request'}

@oczkers: any idea what could be the cause of this?
cant find an answer in the log...

from fut.

oczkers avatar oczkers commented on May 29, 2024

what exact parameters do you provide to searchauction?
how big interval?

from fut.

ar23 avatar ar23 commented on May 29, 2024

items = fut.searchAuctions('development', assetId=5001003, page_size=50)

Maybe 2 to 3 Queries per 30 Sec.

from fut.

ar23 avatar ar23 commented on May 29, 2024

i think setting a min & max price fixed this.....not sure why. I will verify this later on

from fut.

ar23 avatar ar23 commented on May 29, 2024

working for me now.

does somebody have an idea how to run multiple scripts (with differnt accounts of course) parallel?

I'm currently running my scripts sequential. If you just start more than one script which accesses the fut.core components you'll get access denied errors - of course.
So I dont have a clue if it is possible to maybe install fut.core multiple times or if i have to just start multiple python threads (if the fut.core module could/would be cached that would be an option....)

from fut.

oczkers avatar oczkers commented on May 29, 2024

working for me now.

Nothing has changed so it has to be on server side.

So I dont have a clue if it is possible to maybe install fut.core multiple times or if i have to just start multiple python threads (if the fut.core module could/would be cached that would be an option....)

Are you trying to manage two separate accounts in one script?
It should be working if you create two separate session objects:

f1 = fut14.Core('email', 'password', 'secret answer')
f2 = fut14.Core('email', 'password', 'secret answer')

from fut.

ar23 avatar ar23 commented on May 29, 2024

Adding a min & max price for the search query fixed this. so probably a server side change was applied the last few days.

I thought about running multiple scripts at the same time. because if i create two separate sessions in one script, i still can just query sequential, dont i?

but maybe defining two session objects could solve my issue, too. Dont know how the access on the modules is handled in python. Got access denied errors from core.py last time i tried to run two scripts parallel....
As soon as the servers are back I'll try.

Thank you!

from fut.

oczkers avatar oczkers commented on May 29, 2024

Adding a min & max price for the search query fixed this. so probably a server side change was applied the last few days.

are you getting Bad Request everytime you call searchAuction without min/max price and never where it's provided??

I thought about running multiple scripts at the same time. because if i create two separate sessions in one script, i still can just query sequential, dont i?

for example http://docs.python.org/2/library/threading.html

from fut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.