Free Money? — Automate hi.com in Python.
Published: 2022-01-08 18:49:57

One of the easiest ways to generate a bit of fun passive income is to signup to [hi.com](https://hi.com/sgent) and login once a day to claim your 1 HI token (about $1 today). If you are nervous about getting into the crypto space or just like the idea of earning a bit of extra cash then this is a fun site to try.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/getqj9c44iuqbmku7gnl.jpg)

Despite requiring just a few clicks, I’m seriously lazy and, of course, had to spend more time automating this claiming process than it will probably ever take to do manually once a day … but hey, programmers like a challenge!

To automate the claiming process I use a Windows PC and the browser interface to visit the hi.com website. Using the PyAutoGUI library we can run a python script that will launch the browser to visit the hi.com website, login and press the little present icon that claims our prize each day. You can edit this free python script to include your own account information. Once you have installed this you can run the script once a day and watch it perform the process for you! This has only been tested on Windows but should work for other platforms with some modifications. Here’s a step by step guide on how to accomplish this:

- - Register with [hi.com](https://hi.com/sgent) (thanks for using my referral code!) to get an account. Note, to this day I have (not yet) received any spam phone calls by doing this but it certainly can change in the future!
- Be sure to have python installed. If not visit Python.org
- Be sure to have PyAutoGUI installed. If not, follow the instructions on the PyAutoGUI website to install (takes less than a minute). I had to run both “pip install pyautogui” and “pip install pillow” to get everything to install.
- [Download ](https://www.easix.com/Medium/hi.com.zip) the zipped package which includes the run.py script and the png images that are used to find the appropriate locations to click. Extract all this in a folder that you can remember. This should only include on .py file and a couple images. No .exe files are present in this download!
- Edit the run.py file using a text editor (notepad?) in that folder to change the phone number and password to your account (it doesn’t help if you try to claim my gift!). These are defined right at the top of the script. Keep the quotes but change what’s within them.
- Open a command prompt (type cmd in windows menu) and run the run.py script. You should just be able to type “run.py” (without quotes) once you are in the right folder (cd /folder/ where you put run.py). Once you run it you may get some error messages if you are missing any of the above installs which is useful to see on the first run.
- Setup a daily run task (windows) or cron tab job (linux) or a calendar reminder to run this file in order not to forget!

This is a VERY brittle script. It can easily break if you use a different browser than Chrome/Brave which is where the images were snapped from. If you find that the location of an image is not found, take a screen snapshot and update those images with your own (they are just regular png images … do NOT use jpg format as its lossy). That should customize the script to your own browser / OS.

It is also possible that hi.com decides to change the login and claiming process. If this happens this script will break. But as you have the source file and can read what it is attempting to do this is a great way to get you started in python programming (one of the most popular systems today) and have a reason to learn how the language works to fix any changes that cause errors.

Note, I included “Stage X” print statements to help you understand where the script may have broken so you can focus on those areas.
Obviously, if you start clicking with your mouse while this script is running and hide your browser window it WILL fail and cause the script to exit.

Hopefully this is a fun script to learn Python and play with while earning a little extra passive income cash on the side. Who knows, the HI token could moon to $100!

Good luck!

Reference Links:
hi.com website — https://hi.com/sgent
Python Download — https://www.python.org/
PyAutoGUI— https://pyautogui.readthedocs.io/en/latest/install.html
PyAutoGUI Screenshot — https://pyautogui.readthedocs.io/en/latest/screenshot.html
Browser Object — https://elearning.wsldp.com/python3/python-open-web-browser/
Learning Python — https://www.tutorialspoint.com/python/