fifa4计算机中丢失api,GitHub - futapi/fut: fut is a simple library for managing Fifa 19 Ultimate Team....

WARNING: I've review requests and this version looks as safe as stable versions for fifa18 but i might have miss something so please be careful.

fut

68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f6675742e737667

68747470733a2f2f696d672e736869656c64732e696f2f707970692f6c2f6675742e737667

68747470733a2f2f696d672e736869656c64732e696f2f707970692f707976657273696f6e732f6675742e737667

f3d9fd761044c378cb30d5497b551148.png

68747470733a2f2f636f6465636f762e696f2f6769746875622f6675746170692f6675742f636f7665726167652e7376673f6272616e63683d6d6173746572

68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6635393938303866626132343437633938323533636634346363613836613162

68747470733a2f2f63646e2e776f726c64766563746f726c6f676f2e636f6d2f6c6f676f732f736c61636b2e737667

fut is a simple library for managing Fifa Ultimate Team.

It is written entirely in Python.

Documentation

Documentation is available at http://fut.readthedocs.org/.

68747470733a2f2f63646e2e776f726c64766563746f726c6f676f2e636f6d2f6c6f676f732f736c61636b2e737667

PHP ported version by InkedCurtis

If You prefer php language, there is ported version made by InkedCurtis: https://github.com/InkedCurtis/FUT-API

AutoBuyer GUI

If You're looking for "user friendly" autobuyer take a look at hunterjm's project (dead probably):

https://github.com/hunterjm/futgui/releases

Usage

Login

Optional parameters:

code: [string] email/sms code for two-step verification (make sure to use string if your code starts with 0).

platform: [pc/ps3/ps4/xbox/xbox360] pc default.

emualte: [and/ios] use this feature to avoid webapp errors (BE WARE IT'S HIGH RISK).

debug: [True/False] enables debug.

cookies: [filename] saves cookies after every request and load it from given file when restaring app (just like browser).

anticaptcha_client_key: [str] API key for [Anti Captcha](https://anti-captcha.com/). Requires setting proxies. After you encounter Captcha exception while making a request you should reinitialize Core object (it will relaunch session and enter Captcha).

>>> import fut

>>> session = fut.Core('email', 'password', 'secret answer')

Be sure to set platform= to your platform and sms=True if you use SMS for 2 Factor Authentication.

Search

Optional parameters:

min_price: [int] Minimal price.

max_price: [int] Maximum price.

min_buy: [int] Minimal buy now price.

max_buy: [int] Maximum buy now price.

level: ['bronze'/'silver'/gold'] Card level.

start: [int] Start page number.

category: ['fitness'/'?'] Card category.

assetId: [int] assetId.

defId: [int] defId.

league: [int] League id.

club: [int] Club id.

position: [int?/str?] Position.

zone: ['attacker'/'?'] zone.

nationality: [int] Nation id.

rare: [boolean] True for searching special cards.

playStyle: [str?] playStyle.

page_size: [int] Amount of cards on single page (changing this might be risky).

>>> items = session.searchAuctions('player')

Bid

Optional parameters:

FAST: [boolean] True for skipping trade status & credits check.

>>> session.bid(item['tradeId'], 600)

Sell

Optional parameters:

buy_now: [int] Buy now price.

duration: [int] Auction duration in seconds (3600 default).

>>> session.sell(item['id'], 150)

Before selling a newly-bought item, you have to send it to the tradpile. session.sendToTradepile(item_id)

Quick sell

single item:

>>> item_id = 123456789

>>> session.quickSell(item_id)

multiple items:

>>> item_id = [123456789, 987654321]

>>> session.quickSell(item_id)

Piles (Watchlist / Tradepile / Unassigned / Squad / Club)

>>> items = session.tradepile()

>>> items = session.unassigned()

>>> items = session.squad()

>>> items = session.club(count=10, level=10, type=1, start=0)

>>> items = session.clubConsumablesDetails()

>>> session.sendToTradepile(item_id) # add card to tradepile

>>> session.sendToClub(trade_id, item_id) # add card to club

>>> session.sendToWatchlist(trade_id) # add card to watchlist

>>> session.tradepileDelete(trade_id) # removes item from tradepile

>>> session.watchlistDelete(trade_id) # removes item from watch list (you can pass single str/ing or list/tuple of ids - like in quickSell)

>>> session.tradepile_size # tradepile size (slots)

80

>> len(session.tradepile()) # tradepile fulfilment (number of cards in tradepile)

20

>>> session.watchlist_size # watchlist size (slots)

30

>> len(session.watchlist()) # watchlist fulfilment (number of cards in watchlist)

10

Credits

It's cached on every request so if you want the most accurate info call fut.keppalive()

>>> session.credits

600

Relist

Relists all expired cards in tradepile.

>>> session.relist() # relist all expired cards in tradepile

Apply consumable

Apply consumable on player.

item_id: [int] Player's item_id.

resource_id: [int] Consumable's resource_id.

>>> session.applyConsumable(item_id, resource_id)

Card stats and definiction IDs

Returns stats and definition IDs for each card variation.

>>> session.searchDefinition(asset_id, start=0, count=35)

Keepalive

Sends keepalive ping and returns current credits amount (you have to make at least one request every ~10 minutes to avoid session expire/logout).

>>> session.keepalive()

650

Logout

Logs out nicely (like clicking on logout button).

>>> session.logout()

Database

Database if fully cached at first invocation so there won't by any additional requests:

>>> fut.nations

>>> fut.leagues

>>> fut.teams

>>> fut.stadiums

>>> fut.players

>>> fut.playstyles

You can access database even without login:

>>> import fut

>>> nations = fut.core.nations()

>>> leagues = fut.core.leagues()

>>> teams = fut.core.teams()

>>> stadiums = fut.core.stadiums()

>>> players = fut.core.players()

>>> playestyles = fut.core.playstyles()

Convert Team/League/Nation/Player id to name

>>> nations[1]

... 'Albania'

>>> leagues[1]

... 'Alka Superliga'

>>> teams[1]

... 'Arsenal'

>>> stadiums[1]

... 'Old Trafford'

>>> players[1]

... {'rating': 88, 'lastname': 'Seaman', 'id': 1, 'firstname': 'David', 'nationality': 14, 'surname': None}

>>> playstyles[250]

... 'BASIC'

Item object (dict) structure

>>> for item in items:

... trade_id = item['tradeId']

... buy_now_price = item['buyNowPrice']

... trade_state = item['tradeState']

... bid_state = item['bidState']

... starting_bid = i['startingBid']

... item_id = i['id']

... timestamp = i['timestamp'] # auction start

... rating = i['rating']

... asset_id = i['assetId']

... resource_id = i['resourceId']

... item_state = i['itemState']

... rareflag = i['rareflag']

... formation = i['formation']

... injury_type = i['injuryType']

... suspension = i['suspension']

... contract = i['contract']

... playStyle = i['playStyle'] # used only for players

... discardValue = i['discardValue']

... itemType = i['itemType']

... owners = i['owners']

... offers = i['offers']

... current_bid = i['currentBid']

... expires = i['expires'] # seconds left

to be continued ;-)

Problems

How to report bug/attach logs?

enable debug

session = fut.Core('email', 'password', 'secret answer')

reproduce error - for example if there is bug when searching market, just search market with enabled debug

open fut.log, search for password/login and remove it

publish fut.log to help us find root cause of a bug

Getting "requests.exceptions.SSLError:....'utas.mob.v4.fut.ea.com' doesn't match 'utas.mobapp.fut.ea.com'"?

This is a new error, but here's a temporary fix to try:

Re-download the api from github

Go into fut/urls.py

On line 7, change auth_url = rc['authURL'] to auth_url = 'utas.mobapp.fut.ea.com'

Run python setup.py install

Try your script again

Please report in the Slack channel whether or not this worked!!

Bans

To avoid getting ban take a look at our little discussion/guide thread:

https://github.com/oczkers/fut/issues/259

Generally speaking, you should send no more than 500 requests per hour and 5000 requests per day. Be somewhat human. If you encounter a captcha, try to answer/solve it as soon as possible.

Somehow i've sent card to full tradepile and it disappeared

Make space in tradepile and just call one command to restore it:

session.sendToTradepile(-1, id)

I've got card with None tradeId so cannot move/trade it

Make space in tradepile and just call one command to restore it:

session.sendToTradepile(-1, id)

PermissionDenied exceptions raises when trying to sell cards directly from watchlist

The solution is to send the items to Tradepile and offer from there.

CLI examples

not yet

...

License

GNU GPLv3

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值