Closed TheGoblinHero closed 7 years ago
1) Current version 1.2.9 has been updated yesterday and i think 1.2.9 is not stable now and i need more time to test it. I do not want to hurry (i do not want that users with 1.2.8 update to 1.2.9 now). It's will be fix when i tested 1.2.9
2) Great idea, thanks
3) Thanks, but windows users can't run sh scripts. I do not work with FreeBSD, but i will investigate your suggestion.
Have a nice day!
Another bug in 1.2.9 (need conversion to str()?):
Game: Teddy Floppy Ear - Mountain Adventure. Coins: 287 https://www.steamgifts.com/giveaway/DV0gK/teddy-floppy-ear-the-race Traceback (most recent call last): File "./sg.py", line 410, in
requests_result=get_requests(cookie, func_list[chose]) File "./sg.py", line 124, in get_requests get_game_links(r) File "./sg.py", line 147, in get_game_links if enter_geaway(geaway_link): File "./sg.py", line 231, in enter_geaway debug_messages("Giveaway was ended. Bot has late to enter giveaway: ", geaway_link) TypeError: debug_messages() takes 1 positional argument but 2 were given
About 3. Yes, I forgot about windows users. On FBSD platform.system returns "FreeBSD". You can use it to allow sh scripts to run too.
Thanks a lot for bug report.
1) I need more time for testing
2) Done. Please, update settings.txt
elif req_type=="someone" and int(get_coins(get_requests(cookie, "coins_check")))>int(threshold):
Options threshold has been added.
3) Done.
if datetime.datetime.now().time().hour>9 and datetime.datetime.now().time().hour<22 and (platform.system()=="Linux" or platform.system()=="FreeBSD"):
But some changes may be unstable. I need 1 or 2 weeks for tests. Please, update your sg.py file
And i need to update wiki too. Thank you for understanding
Best regards, 4815162342lost.
I need 1 or 2 weeks for tests.
Sure, thx for integrating my ideas. I'm running the script 24/7 so I'll help you with the testing. If I find a bug/problem - I'll post it here.
One more thing - I'm not satisfied with your realization of 3. "Beep" does not work on FBSD and I don't like limiting the external script launch by night time. I propose to change the code this way: http://pastebin.com/M3AbkZiE
P.S. bug found:
Search giveaways contains SimCity Search giveaways contains Legends of Persia Traceback (most recent call last): File "./sg.py", line 412, in
requests_result=get_requests(cookie, func_list[chose]) File "./sg.py", line 133, in get_requests return r UnboundLocalError: local variable 'r' referenced before assignment
I've seen it before in the old version of the script. Can be fixed adding "r=None" at the beginning of the get_requests function.
You want to hear beep only if you won, right? And anytime (at 3:00 am, 06:00 am, 03:00 pm, 06:00 pm and etc.) will be OK for you? And you do not want hear beep if giveaways contains bad words and etc?
Yes, you're right. Because win.sh is not a beep sound for me, but mail send script.
Could you please provide me with your mail send code?
I want to add mail-send function in my script too. If it possible for you, of course. It is very good idea.
Sure. One liner:
echo SteamGifts Win | mail -s "SG Win!" root
Works on FreeBSD, also will work on Linux. The problem is - your computer must be properly configured (mail server or forwarder). For example, on my server all mail for the root user are forwarded to my gmail account. P.S. You can write an email instead of "root", but again, properly configured system is needed.
Added "silent_mode_at_night" on the settings.txt
Please, turn off silent_mode_at_night and you will get e-mail for 24 hours a day.
silent_mode_at_night=0
Bug fixes, i think, but do not sure.
Could you please update script and test again?
Updated, testing now... BTW platform comparison is not needed in this string:
if (datetime.datetime.now().time().hour<9 or datetime.datetime.now().time().hour>22) and silent_mode_at_night and (platform.system()=="Linux" or platform.system()=="FreeBSD"): debug_messages("Not beep, because too late") return 0
Yes, true, thanks. It is will be fix.
3 days of running the latest script - no problems. Everything including emails works as expected.
Thanks you!
Could you please close the issue?
FYI: 2 weeks of flawless work of the script.
Thanks for your feedback! Glad to hear it.
Have a nice day!
Maybe it's worth adding an extra settings (min coins to enter random giveaways) for this?
Not sure if this modification is good for everyone, but still it's a thing to consider.