Skip to content
Snippets Groups Projects
Commit 6680348b authored by Hector Blondel's avatar Hector Blondel
Browse files

outils de débogage

parent a55fa641
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,17 @@ while True :
data = load(f)
for playlist in data :
if playlist not in os.listdir("musics"):
print("une nouvelle playlist a été ajoutée !")
os.chdir("musics")
os.mkdir(playlist)
os.chdir("musics")
os.mkdir("contents")
with open("seen.json",'w') as f :
f.write("[]")
os.chdir("../..")
os.chdir("musics/"+playlist)
chn = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=25&playlistId='+playlist+'&key='+KEY
requete = get(chn)
......@@ -39,6 +50,8 @@ while True :
i += 1
os.chdir("../")
print("mise à jour de seen_videos ...")
print(seen_videos)
with open('seen.json','w') as f2 :
f2.write(dumps(seen_videos))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment