A simple Python script to find inactive follows

in #steem6 years ago (edited)

With @steem-ua now a thing, if you're participating it's going to be important to keep your following list a little bit clean. I knew I had a lot of people from when I first started on Steem who had gone inactive in recent months, and I wanted to find them, so I wrote a little Python program to make a list for me.

I chose to use 40 days as my standard, and check for accounts I'm following who hadn't made a post or comment in that amount of time. A lot of people have had autoclaim rewards and autovoting set up through one service or another, and those might still be running, so I didn't want to include those things in my activity count.

from steem import Steem
from steem.account import Account
from dateutil.parser import parse
import datetime

account = "tcpolymath"
time_period = datetime.timedelta(days=40)
current_time = datetime.datetime.now()

following = Account(account).get_following()

for user in following:
        time_posted = parse(Account(user)["last_post"])
        if current_time - time_posted > time_period:
                print user



(Updated to be even simpler after suggestion from @markgritter.)

In order to use this you'll have to install steem-python, change the username from mine to the account whose inactive follows you want to see, and change the "days=40" if you want a different time period.

I initially thought about just auto-unfollowing, but that seemed like a bad idea; there are a few accounts on there that I knew I wanted to keep following for one reason or another, and I expected there would be some I didn't think of. So I just had it make a list and reviewed them myself.

That also gave me the opportunity to send out a few emails to artists I really wish would come back, in the course of things, which is good. I had meant to write to @timmolloy, but also sent emails to @beauwhiteart and @captainyeeha, if anyone wants to back them up with their own. All of their websites are on their profiles, and have contact forms.

Two users who don't have contact info were once the most prolific animal-related posters here, @amavi and @photofan, so I may take the opportunity to write a little more about animals this fall with that niche open.

I ended up unfollowing 59 inactive accounts, about one-sixth of the total number of people I was following.

Sort:  

I think the account object has a last_post timestamp. But I don't know if that would pick up all comments or not.

It seems like it should, as there are both last_post and last_root_post. That's probably a better way to do several of the things I've been doing, thanks.

Hm, last_post is just a date, though. So I guess it works for this but not for anything I need a permalink for.

That also picks up accounts that have never posted, which my original code did not.

Did it help in your UA score standing?

They lag a little bit in updating the website, so I won't know for a few hours at least.

great post! love this a lot amd i will def try it. not sure why i wasnt following you but i am now!! any news on the u/v dolphin initiative? i wanted to talk to you more in depth in the delegations ... 🤗

We should have a Discord conversation at some point. Still trying to figure out what I want to do about you and Torico. I'm headed out right now but will check in with you a little later today.

ok, @torico too 🙌🏽

what did i do that you need to do something about me? is confuzzled oh wait i think i see - my inactive follows? would love a program to sort them all out...

read the messages above LOL tcpolymath is considering adopting us wayward bunnys im now called eagle bunny 🤣🤣🤣🤣🤣

I don't really understand why you would want to avoid following inactive accounts.

The User Authority algorithm that @steem-ua uses effectively judges you at least a little bit based on the ratio of people who follow you to people you follow.

Following inactive accounts reduces the authority you can pass on to active accounts, who pass it back to you and on to other people in your network, as well as growing your network. So unless there's a significant reason to keep following an absent user, it makes sense to keep your follower count to people who are actually here, if you're participating in UA. If you aren't then it doesn't really matter.

How is this affected by inactive accounts that are following rather than followed?
There doesn't seem to be anyway to remove these.

I don't know the algorithm, but under the basics of UA as a concept having people following you shouldn't reduce your score no matter what. I have reason to suspect that may not be true here, but nothing I'd consider evidence, and the effect doesn't seem to be large.

In any case, as you point out, there's nothing you can do about your followers, so don't worry about it.

Interesting, thank you. I wasn't worried, only curious.

ok, that makes more sense, thank you, I keep a fairly short following list but if I have a problem with a UA score I could pare it down more. Thank you!

Think I'll borrow this idea (unless you have web interface plans yourself) for an asyncsteem tutorial I'm working on.

Tutorial is meant to be about micro-transaction based authentication with twisted web and asyncsteem, but I think this idea could make the resulting web app do something actually usefull instead of the:

"Hello @tcpolymath, you are now authenticated"

idea that I have so far.

Is it OK if I borrow this? I'll link to your post here if I do.

Oh, by all means, take it.

Tutorial comming up, but here is the demo site for the code.

Hello! Your post has been resteemed and upvoted by @ilovecoding because we love coding! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!

Reply !stop to disable the comment. Thanks!

This is some serious stuff @tcpolymath..
Wow...

Great script man its help alot !!

Posted using Partiko Android

Useful very useful keep it up tcpolymath

You got a 40.80% upvote from @ocdb courtesy of @tcpolymath!

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 62966.47
ETH 2631.87
USDT 1.00
SBD 2.79