This commit is contained in:
Edgar P. Burkhart 2024-04-10 13:45:43 +02:00
parent 0f92053046
commit d36e60ad95
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 3 additions and 6 deletions

View file

@ -1,9 +1,8 @@
import logging import logging
import random import random
import re
import sys import sys
from urllib.parse import urlparse, parse_qs
from datetime import datetime from datetime import datetime
from urllib.parse import parse_qs, urlparse
logger = logging.getLogger("musik.list") logger = logging.getLogger("musik.list")

View file

@ -1,7 +1,7 @@
import logging import logging
import pickle
from datetime import date from datetime import date
from pathlib import Path from pathlib import Path
import pickle
import google_auth_oauthlib.flow import google_auth_oauthlib.flow
import googleapiclient.discovery import googleapiclient.discovery
@ -26,9 +26,7 @@ def create_playlist(musik_list):
with pickle_path.open("wb") as f: with pickle_path.open("wb") as f:
pickle.dump(credentials, f) pickle.dump(credentials, f)
youtube = googleapiclient.discovery.build( youtube = googleapiclient.discovery.build("youtube", "v3", credentials=credentials)
"youtube", "v3", credentials=credentials
)
# Création d'une playlist # Création d'une playlist
logger.info("Création de la playlist") logger.info("Création de la playlist")