Skip to content

Instantly share code, notes, and snippets.

@luismond
Created March 10, 2019 00:49
Show Gist options
  • Select an option

  • Save luismond/5f0936ab95ae1629a21c6442f209c7ac to your computer and use it in GitHub Desktop.

Select an option

Save luismond/5f0936ab95ae1629a21c6442f209c7ac to your computer and use it in GitHub Desktop.
save reddit author names
def save_author_names():
authors = [cmnt.author.name for cmnt in reddit.subreddit(sub).comments(limit=None)]
with open('authors'+'_mexico_'+str(time.time())+'.txt', 'w', encoding='utf8') as f:
for a in authors:
f.write(a+'\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment