diff --git a/src/auth.py b/src/auth.py index 7f714da..57785aa 100644 --- a/src/auth.py +++ b/src/auth.py @@ -9,7 +9,7 @@ from urllib.parse import parse_qs, urlencode, urlparse import dotenv import requests -TOKEN_FILE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'env', 'tokens.json') +TOKEN_FILE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../data', 'tokens.json') def simple_authenticate(grant_type: str = "client_credentials") -> str: @@ -102,7 +102,7 @@ def _read_env_file() -> tuple: :return: tuple """ current_dir = os.path.dirname(os.path.abspath(__file__)) - dotenv_folder_path = os.path.join(current_dir, 'env') + dotenv_folder_path = os.path.join(current_dir, '../config') dotenv_path = os.path.join(dotenv_folder_path, '.env') contents = dotenv.dotenv_values(dotenv_path=dotenv_path) spotify_client_id = contents['SPOTIFY_CLIENT_ID'] diff --git a/src/env/.env.example b/src/env/.env.example deleted file mode 100644 index 545e283..0000000 --- a/src/env/.env.example +++ /dev/null @@ -1,3 +0,0 @@ -SPOTIFY_CLIENT_ID=your_token_here -SPOTIFY_CLIENT_SECRET=your_token_here -SPOTIFY_REDIRECT_URI=http://localhost:8888/callback diff --git a/src/scraper.py b/src/scraper.py index 794b444..3f57274 100644 --- a/src/scraper.py +++ b/src/scraper.py @@ -3,7 +3,7 @@ import requests from auth import authenticate, simple_authenticate from database_handler import Database, Table -db = Database('spotify_scraped.db') +db = Database('./data/spotify_scraped.db') def scraping():