def stream_market_scrape(cur, conn): """Stream output of current progress of market scrape.""" fut_conn = fut.Core(config.email, config.password, config.secret_answer, code=config.code, platform=config.platform, debug=False) i = 0 page = 1 stop = False while stop is False: try: items = fut_conn.searchAuctions('player', start=page, level='gold') if len(items) < 1: continue for item in items: api.post_transaction(item, cur) i = i + 1 page += 1 print "Expires:" + str(items[0]["expires"]) print "Page:" + str(page) print "Number of cards: " + str(i) + "\n" conn.commit() time.sleep(random.randint(1, 3)) except: page = 1 time.sleep(30) print "\ndone" return
def connect(): return fut.Core(email=email, passwd=pwd, secret_answer=sec_ans, platform=plt, code=sec_code, debug=True)
def __init__(self, username, password, secretAnswer, coinLimit=0): self.session = fut.Core(username, password, secretAnswer) self.boughtPlayers = [] self.soldPlayers = [] self.coins = self.session.keepalive() self.actionCount = 0 # necessary to make sure market is not pinged more that 500 times in one hour self.playersToTrade = {} self.coinLimit = coinLimit self.tradeStartTime = 0 self.allowTrade = True
def __init__(self, email, password, passphrase, platform='ps4', code=None): debug = os.getenv('APP_ENV') == 'development' self.client = fut.Core(email, password, passphrase, platform=platform, code=code, debug=debug, cookies='auth/' + passphrase + '_cookie.txt', token='auth/' + passphrase + '_token.txt')
def refresh_club_data(email, password, secret_answer, platform): session = fut.Core(email, password, secret_answer, platform=platform) club_data = session.club() leagues = session.leagues leagues_short = {} for k, v in json.load(open('leagues_short.json')).items(): leagues_short[int(k)] = v teams = session.teams nations = session.nations players = session.players filter = [ 'assetId', 'leagueId', 'teamid', 'nation', 'position', 'rareflag' ] filtered = [] for i in club_data: filtered.append({key: i[key] for key in filter}) clean_data = [] for i in range(len(filtered)): position = filtered[i]['position'] rating = players[filtered[i]['assetId']]['rating'] last_name = players[filtered[i]['assetId']]['lastname'] nation = nations[filtered[i]['nation']] league = leagues_short[filtered[i]['leagueId']] clean_data.append({ 'id': filtered[i]['assetId'], 'pos_name_rating': position + '|' + last_name + '|' + str(rating), 'pos_rating': position + '|' + str(rating), 'pos_nation_league': position + '|' + nation[:4] + '|' + league + '|' + str(rating), 'last_name': last_name, 'rating': rating, 'position': position, 'league': league, 'country': nation, 'team': teams[filtered[i]['teamid']], 'rare': filtered[i]['rareflag'] }) with open('club_data.json', 'w') as fp: json.dump(clean_data, fp)
def __init__(self): email = '*****@*****.**' password = '******' secret = 'kolasa' platform = 'xbox360' self.session = fut.Core(email=email, passwd=password, secret_answer=secret, platform=platform, debug=True, cookies='../connector/cookies.txt', token='../connector/token.txt')
def login(): global fut print('Email: ') email = raw_input() print('Password: '******'Secret: ') secret = raw_input() print('platform: [pc/ps3/ps4/xbox/xbox360] ') platform = raw_input() print('Loading...') fut = fut.Core(email, password, secret, platform) print('You have logged in successfully.')
def sell_buy_players(f_sell=1, f_buy=1): global core time_start = datetime.now() print("Start Time: " + str(time_start)) while True: try: core = fut.Core('*****@*****.**', 'P@ssw0rd', 'raichu', platform='ps4') print('Logged in successfully!') print('Current coins: ' + str(core.keepalive())) break except: print('Failed to login, trying again...') pass if f_sell == 1: time_start_sell = datetime.now() sell_df = sell_players() time_sell = datetime.now() time_taken_sell = time_sell - time_start_sell print("Time taken to sell: " + str(time_taken_sell)) if f_buy == 1: time_start_buy = datetime.now() buy_df = buy_players(max_buy=6000000) time_taken_buy = datetime.now() - time_start_buy print("Time taken to buy: " + str(time_taken_buy)) time_end = datetime.now() time_delta = time_end - time_start print("End Time: " + str(time_end)) print("Time taken to sell & buy: " + str(time_delta)) print('Current coins: ' + str(core.keepalive())) print('Logging out...') core.logout() return None
def logIntoFut(code=''): try: print 'Logging in . . .' fifa = fut.Core(settings['EMAIL'], settings['PASSWORD'], settings['SECRET'], platform=settings['PLATFORM'], cookies='cookies.txt', code=code) print 'FUT Client logged in.' return fifa except Exception as ex: if 'probably invalid email' in str(ex): print 'FUT Login Error: Invalid email or password.' quit() elif 'code is required' in str(ex): ourCode = raw_input('FUT Login Error: Code is required, please type it in:\n') return ourCode elif 'provided code is incorrect' in str(ex): ourCode = raw_input('FUT Login Error: Provided code is incorrect, please retype it:\n') return ourCode else: print ex return
import os from pprint import pprint import requests CRED = '\r\033[91m' CYELLOW = '\r\033[33m' CGREEN = '\r\033[92m' CEND = '\033[0m' sellOnMMOGA = True gewinn = 0 coins = 0 tradepile = 0 startCoins = 0 os.system('clear') session = fut.Core('*****@*****.**', 'xx', 'kaiee', platform='xbox') #item = ronaldo[0] #trade_id = item['tradeId'] #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']
while True: players_fetched = fut.club(fetch_size, 10, 1, len(players)) players += players_fetched if len(players_fetched) != fetch_size: break return players import fut print(">> Logando...") fut = fut.Core('*****@*****.**', 'ZOVHHWILale15', 'Belem','xbox', '123141') print('>> Logado!') while True: printMenu() choice = input('>> Option: ') if choice == "1": print(len(getAllPlayersInClub(fut))) elif choice == "2": players = getAllPlayersInClub(fut) for player in players: print(player) print(str(player['resourceId']) + " | " + str(player['discardValue']))
if relist == True: print('Relist some items') session.relist() if clear == True: print('Clear sold items') session.tradepileClear() while True: try: if first_time == True: print('Welcome to FUT!') print('Login: '******'email'], os.environ['password'], os.environ['secret'], platform="ps4") print( requests.get( 'https://api.telegram.org/bot%s/sendMessage?text=%s&chat_id=%s' % (os.environ['telegram'], 'Login ^^', os.environ['chat_id']))) first_time = False print(' At: ', datetime.datetime.now()) coins = session.keepalive() print('You have $', coins) tradepile_count = len(session.tradepile()) print('Tradepile count:', tradepile_count) if coins <= stop_bid_buy:
#!/usr/bin/python # -*- coding: utf-8 -*- import fut from datos import email, password, respuesta, plataforma from bs4 import BeautifulSoup import time import requests import re futbin = "https://www.futbin.com" futbinDcp = "/squad-building-challenges/ALL/" print("Iniciando sesion...") session = fut.Core(email, password, respuesta, plataforma) if plataforma == "xbox": precioPlataforma = "data-xone-price" plataformaFutbin = "xone" precioJugadorBuscar = "data-price-xbl" elif plataforma == "ps": precioPlataforma = "data-ps-price" plataformaFutbin = "ps4" precioJugadorBuscar = "data-price-ps3" elif plataforma == "pc": precioPlataforma = "data-pc-price" plataformaFutbin = "pc" precioJugadorBuscar = "data-price-pc"
import fut import time import json config = {} print("reading configuration") with open('config.json', 'r', encoding='utf8') as confFile: config = json.load(confFile) print("connecting to FUT ...") start = time.time() session = fut.Core(config['username'], config['password'], config['secret'], config['platform']) end = time.time() elapsed = end - start print("connected in " + str(elapsed) + " seconds") # check tradePile available slots slots = 0 slots = 100 - len(session.tradepile()) print("available trade pile slots:" + str(slots)) # check credits credit = session.keepalive() print("you have: " + str(session.credits) + " coins") def listPlayerOnTransferMarket(item): min_buy_now_price = getMinBuyNowPrice(item['resourceId']) print("selling item: " + str(item['id']) + " of type: " + item['itemType'] + " min:" + str(item['marketDataMinPrice']) + ", buyNow:" + str( min_buy_now_price))
import fut fut = fut.Core('maillogin', 'passwort', 'sicherheitsabfrge', debug=True) items = fut.searchAuctions(ctype='player', level='gold') #nations = fut.nations() leagues = fut.leagues() teams = fut.teams() stadiums = fut.stadiums() players = fut.players() playestyles = fut.playstyles()
credentials = Credentials() # Verbindung zur DB db = DB.Database(credentials.db['host'], credentials.db['user'], credentials.db['pass'], credentials.db['name']) pinAutomater = PinAutomater( credentials.mail['host'], credentials.mail['user'], credentials.mail['pass'], credentials.mail['port'], ) # Verbindung zu EA fut = fut.Core( credentials.ea['mail'], credentials.ea['pass'], credentials.ea['secr'], #code=pinAutomater, debug=True) """create fut_players table""" # executeSqlFromFile(db, '../model/sqlqueries/futplayers.sql') """create fut_watchlist table""" # executeSqlFromFile(db, '../model/sqlqueries/futwatchlist.sql') """ fill fut_players table """ # loadPlayerDatabase(fut, db) """Erfolgreiche Trades aus Watchlist in DB speichern""" # succesTradesFromWatchlist(fut,db) """Test Query""" # q = "SELECT * FROM Player" """Suche""" #items = fut.searchAuctions(ctype='player', page_size=48) # print(items)
import fut import random from time import time fut = fut.Core('*****@*****.**', '2013Zhuangyuan', 'weiwei', 'xbox', '146498')
import random import time import fut session = fut.Core('*****@*****.**', 'xxx', 'test', platform='ps4', debug=True) count = 0 i = 0 size = int(input('Nhap so luong card can mua :')) while True: items = session.searchAuctions('training', max_buy=200, start=i, category='position', position='LW-LM') if count > size: break for x in items: if count > size: break flag = session.bid(x['tradeId'], 200) print(flag) if flag: a = session.sendToClub(x['id']) if a: count += 1 print("count:%d" % (count)) print("wait for 5,10s ...") i += 20 time.sleep(random.randint(10, 15)) session.logout()
def connect(self): self.session = fut.Core(self.account, self.passwort, self.sicherheitskey, platform=self.platform)