This idea came around while I was browsing Instagram, and I saw one of my friends had one of those "taken" things in their bio, but theirs was different. It was in the future.

With this, I set out to put one of these messages in my bio, but with a twist. I wanted it to update to todays date, every day at midnight.

To do this, I took a night to write a simple python script that will update my Instagram bio, once a day, for the rest of eterntity.

For Instagram API Wrappers, I picked instagram_private_api. This is the only python API I could find that actually supports the edit_profile call.

I took one of the examples which logged me in, saved my session token etc, and changed it so that it will update my bio, with a simple template

 # Call the api
    from datetime import date
    d = date.today().strftime("%-d/%-m/%Y")
    bio = f"🔒💞{d} 💞🔒\nim not @hexf.me"
    name = "Thomas"
    results = api.edit_profile(name, bio, "", email, phone, 1)

Then I created a little wrapper bash script, just to hold my credentials in. Its probably not the safest thing in the world, I advise against it if you care about the security of the account, but for me, I felt sufficent running it on a little server that runs all my other scripts on my home network.

#!/bin/bash
# probably remove creds
python3 instagram_bio.py --settings instagram_user.json -u not.hexf.me -p "[redacted]

Making sure the bash file is executable with chmod a+x ./daily.sh I set out to create a cron tab that would run this script every night at 12:00AM.

1 crontab -e later, and a simple 0 0 * * * /opt/Scripts/daily.sh and I have my script running every day, at midnight.

Now I will forever have a girlfriend and she requires no maintainance 🙂