Skip to content

Instantly share code, notes, and snippets.

@planglois925
Created September 11, 2017 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save planglois925/835d3be17c0e7a5670c5c152afcb220a to your computer and use it in GitHub Desktop.
Save planglois925/835d3be17c0e7a5670c5c152afcb220a to your computer and use it in GitHub Desktop.
def load_twitter_accounts():
twitter_accounts = []
print "[] Loading twitter accounts (the good ones)"
file_location = os.path.join('data','twitter.txt')
if os.path.isfile(file_location):
with open(file_location) as f:
for account in f.readlines():
acc = account.strip('\n').strip('\r').lower()
twitter_accounts.append(str(acc))
print "[x] %s Accounts Loaded" % len(twitter_accounts)
else:
print "][ Failed to load accounts: File not found"
return twitter_accounts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment