Improve code formatting
This commit is contained in:
parent
295a44fbaa
commit
0fd0c4911b
3 changed files with 38 additions and 42 deletions
|
@ -5,7 +5,7 @@ import googleapiclient.discovery
|
|||
import googleapiclient.errors
|
||||
|
||||
|
||||
def create_playlist(MUSIK):
|
||||
def create_playlist(musik_list):
|
||||
# Connexion à l'API youtube, obtention d'un jeton OAuth
|
||||
print("> Connexion à l'API Youtube")
|
||||
flow = google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file(
|
||||
|
@ -30,14 +30,14 @@ def create_playlist(MUSIK):
|
|||
pl_response = pl_request.execute()
|
||||
print(
|
||||
"> > Playlist créée :",
|
||||
f"https://www.youtube.com/playlist?list={pl_response['id']}"
|
||||
f"https://www.youtube.com/playlist?list={pl_response['id']}",
|
||||
)
|
||||
|
||||
# Insertion des musiques dans la playlist
|
||||
print("> Insertion des musiques dans la playlist")
|
||||
print(f"> > {'_'*len(MUSIK)}")
|
||||
print(f"> > {'_'*len(musik_list)}")
|
||||
print("> > ", end="")
|
||||
for musik in MUSIK:
|
||||
for _, musik in musik_list:
|
||||
print("#", end="")
|
||||
request = youtube.playlistItems().insert(
|
||||
part="snippet",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue