Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김유민
/
digging-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
blue
2021-12-02 20:43:17 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b951c5a4877e7a1870cbc9bb44f57c4854fff64f
b951c5a4
1 parent
b54d1dd7
Delete unnecessary files
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
28 deletions
spotify test.py
spotify test.py
deleted
100644 → 0
View file @
b54d1dd
#!/usr/bin/env python
# coding: utf-8
# In[5]:
from
spotipy.oauth2
import
SpotifyClientCredentials
import
spotipy
import
pprint
client_id
=
"faf7865d62b5488da2f6bca05e63a075"
client_secret
=
"b888f07e8986499aa70950b0235d81eb"
lz_uri
=
'spotify:artist:13ubrt8QOOCPljQ2FL1Kca'
# ASAP Rocky
client_credentials_manager
=
SpotifyClientCredentials
(
client_id
=
client_id
,
client_secret
=
client_secret
)
sp
=
spotipy
.
Spotify
(
client_credentials_manager
=
client_credentials_manager
)
results
=
sp
.
artist_top_tracks
(
lz_uri
)
# get top 10 tracks
for
track
in
results
[
'tracks'
][:
10
]:
print
(
'track : '
+
track
[
'name'
])
print
(
'audio : '
+
track
[
'preview_url'
])
print
(
'cover art: '
+
track
[
'album'
][
'images'
][
0
][
'url'
])
print
()
Please
register
or
login
to post a comment