thebrumby / HotWalletClaimer

Looking to optimize your earnings with HOT tokens on the Near Protocol? How about Wave on SUI? Tree on BSC? Or Vertus on Ton? This Python script simplifies the process by monitoring your account status within popular Telegram apps, ensuring rewards are claimed at the correct time.
MIT License
84 stars 31 forks source link

SEED: Refactor code and get dialy bonus #82

Closed jbr1989 closed 1 day ago

jbr1989 commented 2 days ago

I have refactored the code using the Claimer class. And I have also added checking the daily bonus.

Wellynounet commented 2 days 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!

thebrumby commented 2 days ago

Thank you @jbr1989!

I'll also test in the next day or two, and then merge.

thebrumby commented 2 days ago

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 :)

thebrumby commented 2 days ago

Oh, and I added my "first" game using your template :) BNB-Mine Cold, or whatever they're calling themselves these days!

jbr1989 commented 2 days 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!

FIX get daily bonus. And add get WORM (experimental).