You are viewing a single comment's thread from:

RE: Follower Rewards

in #payouts7 years ago (edited)

Here's one way to go about it using lastvote time with Steem Python. You could probably go deeper by checking last comment as well but think lastvote is a good determinant of an active user.

import sys
import time
import datetime
from steem import Steem
from steem.account import Account
now=datetime.datetime.utcnow() 
my_nodes = ['https://rpc.buildteam.io','https://rpc.steemliberator.com','https://steemd.minnowsupportproject.org']
steem = Steem(my_nodes)
account = Account('money-dreamer',steem)
lastvote = account['last_vote_time']
dt=datetime.datetime.strptime(lastvote, "%Y-%m-%dT%H:%M:%S")
dif=now-dt
if dif.days < 3:
    <execute script block>

Please, excuse the lack of comments but am glad to answer any questions.