Skip to content
Snippets Groups Projects
Commit 6cf2ed86 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

externalized settings

parent a11658eb
Branches
Tags
No related merge requests found
from __future__ import unicode_literals from __future__ import unicode_literals
import json
import os import os
import sys import sys
...@@ -133,10 +134,8 @@ class SaveMyPlaylist: ...@@ -133,10 +134,8 @@ class SaveMyPlaylist:
if __name__ == '__main__': if __name__ == '__main__':
API_KEY = 'AIzaSyD1cQOPzYDRe5pylXEFsQw6u-MaBSOX09Y' with open("settings.json", "r") as f:
PLAYLIST_ID = 'PL7F-5FkCMt0HRvF40L2704WhjJZf9G6SB' SETTINGS = json.load(f)
DESTINATION_FOLDER = 'C:/Users/ROGO2/Desktop/123'
SKIP_DOWNLOAD = True
saveMyPlaylist = SaveMyPlaylist(API_KEY, PLAYLIST_ID) saveMyPlaylist = SaveMyPlaylist(SETTINGS['apiKey'], SETTINGS['playlistId'])
saveMyPlaylist.download_items(DESTINATION_FOLDER, SKIP_DOWNLOAD) saveMyPlaylist.download_items(SETTINGS['destinationFolder'], SETTINGS['skipDownload'])
{
"apiKey": "",
"playlistId": "",
"destinationFolder": "",
"skipDownload": false
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment