2015-05-17 19:33:25 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
2016-05-30 18:40:21 +00:00
|
|
|
import twitools, setuptools
|
2015-05-18 11:05:14 +00:00
|
|
|
import os, time, tweepy
|
2015-05-17 19:33:25 +00:00
|
|
|
|
2015-05-18 11:05:14 +00:00
|
|
|
def getOutDir(dirname="followers"):
|
|
|
|
if not os.path.isdir(dirname):
|
|
|
|
os.mkdir(dirname)
|
2015-05-17 19:33:25 +00:00
|
|
|
|
2015-05-18 11:05:14 +00:00
|
|
|
def getOutFile(dirname="followers"):
|
|
|
|
getOutDir(dirname)
|
|
|
|
return os.path.join(dirname, str(int(time.time())) + ".txt")
|
|
|
|
|
|
|
|
def writeOutFile(outfile=getOutFile()):
|
|
|
|
with open(getOutFile(), 'a') as f:
|
2016-08-01 14:39:55 +00:00
|
|
|
for follower in twitools.getNamesByIDs(twitools.getFollowerIDs()):
|
2015-05-18 11:05:14 +00:00
|
|
|
f.write(follower + "\n")
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
writeOutFile()
|