jshackles / idle_master_py Goto Github PK
View Code? Open in Web Editor NEWThe Python version of Idle Master
License: GNU General Public License v2.0
The Python version of Idle Master
License: GNU General Public License v2.0
i'm working on linux everyday, and i want to idle all my steam games on linux.
but this idle_master_py no update to the latest version of steam client.
so please update
Sorry about my bad english.
Steam is now only accessible with HTTPS. I assume you only fetch badges page via HTTP and don't use redirects there. So badges page GET fails right away.
Need to fix all curls to use HTTPS.
Hello,
When I start idlemaster on my Debian 7, I've got this error :
mathisca@domain:~/idle/idle_master_py/Releases/Linux$ python start.py
[ 01/12/2016 05:03:19 PM ] WELCOME TO IDLE MASTER
[ 01/12/2016 05:03:19 PM ] Finding games that have card drops remaining
[ 01/12/2016 05:03:21 PM ] Reading badge page, please wait
[ 01/12/2016 05:03:21 PM ] Invalid cookie data, cannot log in to Steam
Press Enter to continue...
I used the cookies of Idlemaster Windows and from my browser and I can't manage to make it work.
Do you have a fix ? Thank you
/usr/lib/python2.7/dist-packages/bs4/init.py:166: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
To get rid of this warning, change this:
BeautifulSoup([your markup])
to this:
BeautifulSoup([your markup], "lxml")
markup_type=markup_type))
how does the thing make steam think that the game is running? even if i dont have the game installed. ho does that work??? i was thinking about making another version like this but with gui and stuff. it would be even more up to date and stuff.
please tell me how to simulate game running on steam
I'm using idle master on my raspberry pi. However, I met a problem. Here is the log.
[ 12/31/2015 10:39:33 PM ] Reading badge page, please wait
[ 12/31/2015 10:39:33 PM ] No games have been blacklisted
[ 12/31/2015 10:39:34 PM ] Idle Master needs to idle 65 games
[ 12/31/2015 10:39:39 PM ] Starting game Absconding Zatwor to idle cards
Loading Linux 32bit library
Couldn't initialize Steam API
[ 12/31/2015 10:39:45 PM ] Absconding Zatwor has 3 card drops remaining
[ 12/31/2015 10:39:45 PM ] Sleeping for 15 minutes
[ 12/31/2015 10:54:46 PM ] Checking to see if Absconding Zatwor has remaining card drops
[ 12/31/2015 10:54:54 PM ] Absconding Zatwor has 3 card drops remaining
[ 12/31/2015 10:54:54 PM ] Sleeping for 15 minutes
However, Steam still shows that I'm not "In game".
How can I deal with it?
Sorry for my poor English.
Hi
I've used this for quite a long time and now it just won't work.
I know cookies change and they're correct. I've done it over and over again before.
Any help here?
Thanks
[ 04/28/2018 10:34:10 PM ] WELCOME TO IDLE MASTER
[ 04/28/2018 10:34:10 PM ] Finding games that have card drops remaining
/usr/lib/python2.7/site-packages/bs4/__init__.py:181: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
The code that caused this warning is on line 158 of the file start.py. To get rid of this warning, change code that looks like this:
BeautifulSoup(YOUR_MARKUP})
to this:
BeautifulSoup(YOUR_MARKUP, "lxml")
markup_type=markup_type))
[ 04/28/2018 10:34:12 PM ] Reading badge page, please wait
[ 04/28/2018 10:34:12 PM ] Invalid cookie data, cannot log in to Steam
Press Enter to continue...
I've been using idle master on Linux but now it's gotten stuck on a game thinking it has cards left to drop when it has none. The game is Letter Quest Grimm's Journey Remastered, appid 373970. I added the ID to blacklist.txt but idle master seems to ignore this. I see no mention of blacklist even being loaded when idle master starts.
start.py and steam-idle.py are duplicated in multiple places.
Releases/Linux/
Source/Idle Master/
Source/steam-idle-py/
From a contributor perspective, I am unsure how to handle this. Should I commit changes to all locations (which would be annoying)? Or should the Linux/ version be considered a fork at this point?
I'm new to Linux and I have literally no idea how to download this program? can I get some instructions? keep in mind that I'm pretty much a Linux noob.
Thx in advance :)
Hi.
First of all, thanks for this project, it's amazing to have a *nix port of Idle Master.
However, at first it worked without any issue... Now this happens: i launch Idle Master, it starts dropping cards, and when a game has finished dropping, it doesn't move to the next game, it stops to "Sleeping for 5 minutes", and it repeats it forever.
The thing is, if i'm at the computer i can stop the program and launch it again, but if i want to launch it and go to bed, next morning it only dropped cards for one single game.
What can i do?
Thanks in advance!
Invalid cookie data, cannot log in to Steam
...
https://github.com/jshackles/idle_master works fine & idles 85 games, but it would auto logout from time to time on my Parallels Desktop VM instance. Tried this repo, fulfilled the settings.txt according to Setup Instructions, then got below messages:
./start
Finding games that have card drops remaining
No games have been blacklisted
Idle Master needs to idle 0 games
Successfully completed idling
Can't figure out how to fix it.
Sorry to bother! I downloaded the entire zip to my Macbook Pro but under the Releases/MacOS folder, I'm not seeing any file that I run. I'm really sorry for being so clueless
for me it says that there are no more cards to idle but when i go to my badges and check there are many.. MANY more cards to get..
happened since 3 Jan 2017
Hi there,
I used Idle Master py for quite a long time, always had the same setup/settings, but since the latest Steam client update (not sure if a coincidence) I cannot login anymore: Invalid cookie data is the error message I get.
I use cookies from Google Chrome and I tried countless time to set up the settings file, without success. I also noticed that every time I close and re-open my browser, the "sessionid" and "steamparental" cookies have different content.. don't know if that is standard behaviour or not.
Is there anything else I can try?
Thanks
log :
[ 11/19/2015 01:27:34 PM ] �[32mWELCOME TO IDLE MASTER�[39m
[ 11/19/2015 01:27:34 PM ] Finding games that have card drops remaining
[ 11/19/2015 01:27:34 PM ] Starting new HTTP connection (1): steamcommunity.com
[ 11/19/2015 01:27:35 PM ] "GET /profiles/76561198025965205/badges/ HTTP/1.1" 302 26
[ 11/19/2015 01:27:36 PM ] "GET /id/biskythecrunchy/badges HTTP/1.1" 200 None
[ 11/19/2015 01:32:41 PM ] �[31mError reading badge page�[39m
tried with administrator, still not working
tried reconnect my net, still not working
Windows 10 pro x64 version 1511 (OS Build 10586.3)
Use steampy lib by bucson to login into steam on linus servers, bcs if i put my settings from browser to linux server idle not works, bcs ip change
Title. (running Debian Jessie).
Thanks for Idle Master 👍
settings.txt should be read from a user folder (e.g. ~/.config/idlemaster/ or $XDG_CONFIG_HOME/idlemaster on Linux). The problem with having this file in the repository is that contributors might publicly commit their steam account cookie by accident, compromising their account.
I Copy the cookies to setting.txt, but it show this error when I start .
Finding games that have card drops remaining
Error reading badge page
Press Enter to continue.
Did anyone meet this question ?
Is there any possibility to have a commandline only version of this tool?
I really like the tool but do not see the advantage of an image floating around on my desktop.
Actually I planned to maybe setting this up on a server which has no GUI at all.
It would be interesting support for raspberry, it would be really cool of you to make it work in arm.
idle_master.py is working fine for me, however I find that I need to update my SteamLogin cookie in settings.txt from my browser every twelve hours or so.
The sessionid doesn't change, but the SteamLogin cookie does.
The browser never logs out, but idle_master.py does, and it gives this error --
[ 05/27/2016 08:16:31 PM ] Still unable to find drop info.
[ 05/27/2016 08:16:31 PM ] Sleeping for 5 minutes.
... until I stop it and fix the problem and restart.
Reloading steamcommunity.com in my browser doesn't seem to affect it, and my browser never logs out -- just idle master.
Any way of fixing this?
I've adjusted the python script a bit to make it possible that it runs with the steam API and without session/webbrowser. It can also run games in parallel and picks everytime the games with the lowest playtime.
It has a setting for the amount of games and the single loop duration.
time.py
import requests
import time
import subprocess
import sys
import os
import json
import logging
import datetime
import ctypes
from colorama import init, Fore, Back, Style
init()
os.chdir(os.path.abspath(os.path.dirname(sys.argv[0])))
logging.basicConfig(filename="logs/idlemaster_time_" + str(time.time()) + ".log", filemode="w", format="[ %(asctime)s ] %(message)s",
datefmt="%m/%d/%Y %I:%M:%S %p", level=logging.DEBUG)
console = logging.StreamHandler()
console.setLevel(logging.WARNING)
console.setFormatter(logging.Formatter("[ %(asctime)s ] %(message)s", "%m/%d/%Y %I:%M:%S %p"))
logging.getLogger('').addHandler(console)
if sys.platform.startswith('win32'):
ctypes.windll.kernel32.SetConsoleTitleA("Idle Master")
logging.warning(Fore.GREEN + "WELCOME TO IDLE MASTER" + Fore.RESET)
process_idle = {}
idle_time = {}
try:
authData = {}
execfile("./settings.py", authData)
authData["steamId"] = authData["steamLogin"][:17]
except:
logging.warning(Fore.RED + "Error loading config file" + Fore.RESET)
raw_input("Press Enter to continue...")
sys.exit()
if not authData["apiKey"]:
logging.warning(Fore.RED + "No apiKey set" + Fore.RESET)
raw_input("Press Enter to continue...")
sys.exit()
if not authData["steamLogin"]:
logging.warning(Fore.RED + "No steamLogin set" + Fore.RESET)
raw_input("Press Enter to continue...")
sys.exit()
if not authData["steamId"]:
logging.warning(Fore.RED + "No steamId set" + Fore.RESET)
raw_input("Press Enter to continue...")
sys.exit()
def idleOpen(appID):
try:
logging.warning("Starting game " + getAppName(appID) + " to idle cards")
global process_idle
global idle_time
idle_time[appID] = time.time()
if sys.platform.startswith('win32'):
process_idle[appID] = subprocess.Popen("steam-idle.exe " + str(appID))
elif sys.platform.startswith('darwin'):
process_idle[appID] = subprocess.Popen(["./steam-idle", str(appID)])
elif sys.platform.startswith('linux'):
process_idle[appID] = subprocess.Popen(["python2", "steam-idle.py", str(appID)])
except:
logging.warning(Fore.RED + "Error launching steam-idle with game ID " + str(appID) + Fore.RESET)
raw_input("Press Enter to continue...")
sys.exit()
def idleClose(appID):
try:
logging.warning("Closing game " + getAppName(appID))
process_idle[appID].terminate()
total_time = int(time.time() - idle_time[appID])
logging.warning(getAppName(appID) + " took " + Fore.GREEN + str(
datetime.timedelta(seconds=total_time)) + Fore.RESET + " to idle.")
except:
logging.warning(Fore.RED + "Error closing game. Exiting." + Fore.RESET)
raw_input("Press Enter to continue...")
sys.exit()
def getAppName(appID):
try:
api = requests.get("http://store.steampowered.com/api/appdetails/?appids=" + str(appID) + "&filters=basic")
api_data = json.loads(api.text)
return Fore.CYAN + api_data[str(appID)]["data"]["name"].encode('ascii', 'ignore') + Fore.RESET
except:
return Fore.CYAN + "App " + str(appID) + Fore.RESET
def getPlainAppName(appid):
try:
api = requests.get("http://store.steampowered.com/api/appdetails/?appids=" + str(appID) + "&filters=basic")
api_data = json.loads(api.text)
return api_data[str(appid)]["data"]["name"].encode('ascii', 'ignore')
except:
return "App " + str(appid)
def get_blacklist():
try:
with open('blacklist.txt', 'r') as f:
lines = f.readlines()
blacklist = [int(n.strip()) for n in lines]
except:
blacklist = []
if not blacklist:
logging.warning("No games have been blacklisted")
return blacklist
def getKey(item):
return item['playtime_forever']
def getGames():
logging.warning("Finding games to idle")
global authData
blacklist = get_blacklist()
games = []
try:
global authData
url = "http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?format=json&key="+authData['apiKey']+"&steamid="+authData['steamId']
api = requests.get(url)
game_data = json.loads(api.text)['response']['games']
for game in game_data:
gameId = game['appid']
if gameId in blacklist:
logging.warning(getAppName(gameId) + " on blacklist, skipping game")
continue
else:
games.append(game)
return sorted(games, key=getKey)[:authData['parallel']]
except:
logging.warning(Fore.RED + "Error reading games api" + Fore.RESET)
raw_input("Press Enter to continue...")
sys.exit()
while True:
global authData
games = getGames()
for game in games:
idleOpen(game['appid'])
delay = authData['sleeping'] * 60
logging.warning("Sleeping for " + str(delay / 60) + " minutes")
time.sleep(delay)
for game in games:
idleClose(game['appid'])
logging.warning(Fore.GREEN + "Successfully completed idling process" + Fore.RESET)
raw_input("Press Enter to continue...")
settings.py
steamLogin = ""
apiKey = ""
parallel = 6
sleeping = 5
These values are need - the steamLogin
just to extract the steamID
. It's running pretty well.
I've also adjusted some other things like the log location and that it creates everytime a new log file and things like this.
With this you can decrease the amount of unplayed games and increase the play time for every game and with this also your total time.
Hi,i couldn't found any additional commands on MacOS for skip current game and etc.
For example, in full Windows version it has more features, but i think it could be in terminal via commands too.
P.S. Sorry for my English.
Hey,
I'm using Idle Master on Windows and have no problems at all there.
Now I have read here that we can use Idle Master on Linux too, so I'm trying it.
I have installed everything and put the cookie stuff on the settings.txt and get it some kind of working?
I just dont know if its now working correctly or not?
I'm getting this output on ssh.
Using Linux Debian 8 64bit
user@home:/home/idle_master_py/Releases/Linux# python2 start.py
[ 06/15/2017 02:53:38 AM ] WELCOME TO IDLE MASTER
[ 06/15/2017 02:53:38 AM ] Finding games that have card drops remaining
[ 06/15/2017 02:53:39 AM ] Reading badge page, please wait
[ 06/15/2017 02:53:39 AM ] No games have been blacklisted
[ 06/15/2017 02:53:39 AM ] Idle Master needs to idle 2 games
[ 06/15/2017 02:53:39 AM ] Starting game App 392870 to idle cards
[ 06/15/2017 02:53:39 AM ] App 392870 has 3 card drops remaining
[ 06/15/2017 02:53:39 AM ] Sleeping for 15 minutes
Loading Linux 64bit library
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
Traceback (most recent call last):
File "steam-idle.py", line 73, in <module>
gui = init_gui(str_app_id)
File "steam-idle.py", line 42, in init_gui
gui = tk.Tk()
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1813, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
Thanks for your help.
Doesn't appear to work when steam is running with firejail
Dear maintainer,
idle_master always worked fine for me, so thank you for making this.
Today I tried to idle some more games but no process spawn.
It does get the games that need to idle but after "Loading Linux 64bit library" nothing happens.
Did steam change anything that broke this?
I also tried to get a new libsteam_api.so but then idle_master didnt work at all.
-edit- had the 32bit library... using a newer 64bit library didn't change anything.
Thank you.
-Nik05
I have correctly configured settings.txt and I have steam client open as weel as steam community web page. If I run Idle master I get the following message:
./start
Finding games that have card drops remaining
No games have been blacklisted
Idle Master needs to idle 0 games
Successfully completed idling process
As you can see I have severa cards to drop
After upgrade ubuntu to 16.04 idle_master displays the warning:
[popsul] idle_master_py/Releases/Linux [master] M?? % python2 ./start.py
[ 03/11/2016 06:55:42 PM ] WELCOME TO IDLE MASTER
[ 03/11/2016 06:55:42 PM ] Finding games that have card drops remaining
/usr/lib/python2.7/dist-packages/bs4/__init__.py:166: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
To get rid of this warning, change this:
BeautifulSoup([your markup])
to this:
BeautifulSoup([your markup], "html.parser")
markup_type=markup_type))
For some reason, the files for running the Mac version of Idle-Master-py shows up as a jumble of letters. It can't be run, even if the files are renamed with .py at the end.
All I want is to idle a certain game as I have no more card drops, I just need more hours in the game.
Can't remember if I'm meant to use "start" or "steam-idle"
for "start" I get this message
";
Error loading config file
Press Enter to continue...
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]"
and for "steam-idle" I get
"Wrong number of arguments
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]"
I've done the settings (steamlogin and sessionid), not sure where to go from here
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.