Ejemplo n.º 1
0
 def GET(self):
     """
     Sandbox/List is a paginated listing of all of the assets
     available in the sandbox.
     """
     listing = sandbox.list(sandbox_name)
     return render.index(listing=listing)
Ejemplo n.º 2
0
 def GET(self):
     """
     Sandbox/List is a paginated listing of all of the assets
     available in the sandbox.
     """
     listing = sandbox.list(sandbox_name)
     return render.index(listing=listing)
Ejemplo n.º 3
0
import urllib
from pyechonest import config
from pyechonest import sandbox

config.ECHO_NEST_API_KEY = "YLTCU72SODVIC00NB"
config.ECHO_NEST_CONSUMER_KEY = "d0fe2f9558fb209037fc49a4227ac81d"
config.ECHO_NEST_SHARED_SECRET = "9QNMqlVDQWWgMjxJVoej0Q"

# sandbox_name = 'emi_tinie_tempah'
# sandbox_name = "emi_professor_green"

asslist = sandbox.list(sandbox_name, 100)

images = []

for asset in asslist:
    if asset["type"] == "release_image" or asset["type"] == "video_still":
        filename = str(asset["filename"]).partition("/")[2]
        image_asset = sandbox.access(sandbox_name, asset["id"])
        urllib.urlretrieve(image_asset[0]["url"], sandbox_name + "_" + filename)
Ejemplo n.º 4
0
config.ECHO_NEST_CONSUMER_KEY = 'd0fe2f9558fb209037fc49a4227ac81d'
config.ECHO_NEST_SHARED_SECRET = '9QNMqlVDQWWgMjxJVoej0Q'

sandbox_name = 'emi_professor_green'
# sandbox_name = 'emi_tinie_tempah'

print 'getting list of assets'

more_assets = True
asslists = []
images = []
videos = []

start = 0
while more_assets:
    new_asslist = sandbox.list(sandbox_name, 100, start)
    start += 100
    if len(new_asslist) == 0:
        more_assets = False
    else:
        asslists.append(new_asslist)

for i in range(len(asslists)):
    if i == 0:
        combo = asslists[i]
    else:
        combo = combo + asslists[i]    

for asset in combo:
    if 'title' in asset:
         if asset['title'].find('Music Video') > -1 and asset['filename'].find('mp4') > -1: