No default output for filler
This commit is contained in:
parent
708521d4b5
commit
3d55c95bf5
|
@ -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):
|
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.executeQuery("INSERT INTO followers VALUES('%s', %i, 0)" % (str(follower), int(time.time())))
|
||||||
db.commit()
|
db.commit()
|
||||||
print("New follower: %s" % (twitools.getNameByID(follower) if not firstrun else follower))
|
|
||||||
gained += 1
|
gained += 1
|
||||||
|
|
||||||
for follower in current:
|
for follower in current:
|
||||||
if follower not in new and dbtools.fillerfilter.followerFilter(follower, False):
|
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.executeQuery("UPDATE followers SET `until` = %i WHERE `id` = '%s' AND `until` = 0" % (int(time.time()), str(follower)))
|
||||||
db.commit()
|
db.commit()
|
||||||
try:
|
|
||||||
lostname = twitools.getNameByID(follower)
|
|
||||||
except:
|
|
||||||
lostname = "Disabled account"
|
|
||||||
print("Lost follower: %s" % lostname)
|
|
||||||
lost += 1
|
lost += 1
|
||||||
|
|
||||||
return gained, lost
|
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):
|
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.executeQuery("INSERT INTO following VALUES('%s', %i, 0)" % (str(following), int(time.time())))
|
||||||
db.commit()
|
db.commit()
|
||||||
print("You started following: %s" % (str(following) if not firstrun else following))
|
|
||||||
gained += 1
|
gained += 1
|
||||||
|
|
||||||
for following in current:
|
for following in current:
|
||||||
if following not in new and dbtools.fillerfilter.followingFilter(following, False):
|
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.executeQuery("UPDATE following SET `until` = %i WHERE `id` = '%s' AND `until` = 0" % (int(time.time()), str(following)))
|
||||||
db.commit()
|
db.commit()
|
||||||
print("You no longer follow: %s" % twitools.getNameByID(following))
|
|
||||||
lost += 1
|
lost += 1
|
||||||
|
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
Loading…
Reference in a new issue