Skip to content

Instantly share code, notes, and snippets.

@soobrosa
Last active December 21, 2015 19:49
Show Gist options
  • Save soobrosa/6356520 to your computer and use it in GitHub Desktop.
Save soobrosa/6356520 to your computer and use it in GitHub Desktop.
if you ever happen to export your miso history in python
# to export your miso history
# register an app at http://gomiso.com/oauth_clients
# gain your consumer_key and consumer_secret
# grab Gomiso Python from https://github.com/metabaron/Gomiso-Python
# and your ready to go
#
# cc 2013 soobrosa
from gomiso import gomiso
import json
consumer_key = '' # insert your one here
consumer_secret = '' # insert your one here
username = '' # insert your one here
password = '' # insert your one here
tokensFile = 'miso_tokens.txt'
letsGo = gomiso()
if letsGo.authentification(consumer_key, consumer_secret, username, password, tokensFile):
json_result = json.loads(letsGo.getUserInfo())
user_id = json_result['user']['id']
json_result = json.loads(letsGo.userFeed(user_id, 1000))
with open('gomiso_export.json', 'w') as outfile:
json.dump(json_result, outfile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment