No default output for filler

This commit is contained in:
Klaus-Uwe Mitterer 2017-03-07 13:49:19 +01:00
parent 708521d4b5
commit 3d55c95bf5

View file

@ -82,18 +82,12 @@ def getFollowers(db=dbtools.dbHelper(), two=twitools.twObject(), firstrun=False)
if follower not in current and dbtools.fillerfilter.followerFilter(follower, True):
db.executeQuery("INSERT INTO followers VALUES('%s', %i, 0)" % (str(follower), int(time.time())))
db.commit()
print("New follower: %s" % (twitools.getNameByID(follower) if not firstrun else follower))
gained += 1
for follower in current:
if follower not in new and dbtools.fillerfilter.followerFilter(follower, False):
db.executeQuery("UPDATE followers SET `until` = %i WHERE `id` = '%s' AND `until` = 0" % (int(time.time()), str(follower)))
db.commit()
try:
lostname = twitools.getNameByID(follower)
except:
lostname = "Disabled account"
print("Lost follower: %s" % lostname)
lost += 1
return gained, lost
@ -112,14 +106,12 @@ def getFollowing(db=dbtools.dbHelper(), two=twitools.twObject(), firstrun=False)
if following not in current and dbtools.fillerfilter.followingFilter(following, True):
db.executeQuery("INSERT INTO following VALUES('%s', %i, 0)" % (str(following), int(time.time())))
db.commit()
print("You started following: %s" % (str(following) if not firstrun else following))
gained += 1
for following in current:
if following not in new and dbtools.fillerfilter.followingFilter(following, False):
db.executeQuery("UPDATE following SET `until` = %i WHERE `id` = '%s' AND `until` = 0" % (int(time.time()), str(following)))
db.commit()
print("You no longer follow: %s" % twitools.getNameByID(following))
lost += 1
db.commit()