Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F223403
testing.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
879 B
Referenced Files
None
Subscribers
None
testing.py
View Options
#!/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
)
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Fri, May 16, 7:27 PM (16 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
158304
Default Alt Text
testing.py (879 B)
Attached To
Mode
rPYMUSICLEAGUE PyMusicLeague
Attached
Detach File
Event Timeline
Log In to Comment