Mercurial > hg > camir-aes2014
annotate core/magnatagatune/fm_network.py @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
rev | line source |
---|---|
wolffd@0 | 1 import pylast |
wolffd@0 | 2 import sys |
wolffd@0 | 3 |
wolffd@0 | 4 def get_network(): |
wolffd@0 | 5 # You have to have your own unique two values for API_KEY and API_SECRET |
wolffd@0 | 6 # Obtain yours from http://www.last.fm/api/account for Last.fm |
wolffd@0 | 7 API_KEY = "6fae93d29ad1ace84159d5e264114be7" |
wolffd@0 | 8 API_SECRET = "e04dd6c372461fb2de4eb4908fb35ae3" |
wolffd@0 | 9 |
wolffd@0 | 10 # In order to perform a write operation you need to authenticate yourself |
wolffd@0 | 11 # username = "megaoetzwuchst" |
wolffd@0 | 12 # password_hash = "5c15b1b51d73b8a623fef29ca5035abb" |
wolffd@0 | 13 |
wolffd@0 | 14 network = pylast.LastFMNetwork(api_key = API_KEY, api_secret = |
wolffd@0 | 15 API_SECRET) |
wolffd@0 | 16 |
wolffd@0 | 17 # network = pylast.LastFMNetwork(api_key = API_KEY, api_secret = |
wolffd@0 | 18 # API_SECRET, username = username, password_hash = password_hash) |
wolffd@0 | 19 |
wolffd@0 | 20 return network |