Page MenuHomePhorge

testing.py
No OneTemporary

testing.py

#!/usr/bin/env python3
import csv
import json
import sys
import tekore as tk
import pyml_config as config
import libmusicleague as lml
from pprint import pprint
conf = (config.client_id, config.client_secret)
token = tk.request_client_token(*conf)
spotify = tk.Spotify(token)
print("Hello! Lets try some stuff.")
# Get URI or URL from first argument
ur = str(sys.argv[1])
# print(ur)
# print(spotify.current_user())
# print(spotify.user(ur))
# urt = lml.ur_type(ur)
# print(urt)
# st = lml.spotify_type(ur)
# print(st)
# if st == "playlist":
# print("Oh hey, it's a playlist")
# play_list = []
# if urt == "url":
# print(ur)
# uri = tk.from_url(ur)[1]
# pl = lml.play_list(uri)
# #print(pl)
# #play_list += spotify.playlist_items(pl['id'])
# #print(pl)
# pprint(lml.print_playlist(pl))
# elif urt == "uri":
# #print(spotify.playlist(ur))
# #play_list += spotify.playlist(ur)
# print(hello)
#lml.newurl_expand(ur)
print(lml.spotify_type(ur))

File Metadata

Mime Type
text/x-python
Expires
Sun, Jun 29, 9:49 AM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
167850
Default Alt Text
testing.py (975 B)

Event Timeline