Closed jbr1989 closed 1 day ago
hello , I have tested your code on Docker, and everything is working well except for the daily bonus claim functionality.
Thank you for sharing your code with the community!
Thank you @jbr1989!
I'll also test in the next day or two, and then merge.
Just as a head's up, when I get a little spare time, I think I'll move this code from next_steps() into a common function/method in the core functions file. As I think I'll offer it in each game - i.e. the option for the user to set their preferred user agent per game / per session.
if not (self.forceRequestUserAgent or self.settings["requestUserAgent"]):
cookies_path = f"{self.session_path}/cookies.json"
cookies = self.driver.get_cookies()
with open(cookies_path, 'w') as file:
json.dump(cookies, file)
else:
user_agent = self.prompt_user_agent()
cookies_path = f"{self.session_path}/cookies.json"
cookies = self.driver.get_cookies()
cookies.append({"name": "user_agent", "value": user_agent}) # Save user agent to cookies
with open(cookies_path, 'w') as file:
json.dump(cookies, file)
Thanks, it's currently my 4 night shifts at work - so free time is rather minimal :)
Oh, and I added my "first" game using your template :) BNB-Mine Cold, or whatever they're calling themselves these days!
hello , I have tested your code on Docker, and everything is working well except for the daily bonus claim functionality.
Thank you for sharing your code with the community!
FIX get daily bonus. And add get WORM (experimental).
I have refactored the code using the Claimer class. And I have also added checking the daily bonus.