Skip to content

Instantly share code, notes, and snippets.

@lanpa
Created November 10, 2015 08:59
Show Gist options
  • Save lanpa/7b3575996bea7e56715f to your computer and use it in GitHub Desktop.
Save lanpa/7b3575996bea7e56715f to your computer and use it in GitHub Desktop.
f = open('drinkquiz.txt', 'w')
char_remove = ['。\n。\n', '.\n.\n', '…\n…\n', '.\n.\n', '°\n°\n', '·\n·\n', '•\n•\n', '+\n+\n']
for i in range(2500):
for feed in feeds['data']:
if 'message' in feed:
msg = feed['message']
#print (msg)
for rm in char_remove:
msg = msg.replace(rm,'')
#print(msg)
f.write(msg+'\n==========\n\n')
#print('====\n\n')
if 'paging' in feeds:
feeds = requests.get(feeds['paging']['next']).json()
else:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment