예제 #1
0
파일: server.py 프로젝트: dvanoni/TheHack
def amazon(album):

  conn = ECSConnection(aws_access_key_id='AKIAJBGKXZBAD2PVHD6A',aws_secret_access_key='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')
  music = conn.item_search('MP3Downloads', Title=album)#, Count=1, Sort='salesrank')

  for result in music:
    return result.DetailPageURL
예제 #2
0
파일: server.py 프로젝트: dvanoni/TheHack
def amazonSearch():
  title = request.GET.get('title')
  artist = request.GET.get('artist')
  conn = ECSConnection(aws_access_key_id='AKIAJBGKXZBAD2PVHD6A',aws_secret_access_key='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')
  music = conn.item_search("Music", Title=title, Artist=artist)
  for result in music:
    return json.dumps({'url' : result.DetailPageURL})