Skip to content

Commit

Permalink
wouuppsiiii
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieux83 committed Dec 23, 2024
1 parent 5239671 commit 4aff6e6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
1 change: 0 additions & 1 deletion config/API_KEY

This file was deleted.

6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
],
},
package_data={
'': ['config/API_KEY'],
'': ['API_KEY'],
},
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
python_requires='>=3.6',
)
python_requires='>=3',
)
1 change: 1 addition & 0 deletions ytap/API_KEY
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<YOUR_API_KEY_HERE>
9 changes: 7 additions & 2 deletions ytap/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
import subprocess
import sys
import os
from pathlib import Path

# Définir le chemin du fichier API_KEY en fonction du répertoire du projet
BASE_DIR = Path(__file__).resolve().parent
API_KEY_FILE_PATH = BASE_DIR / 'API_KEY'

# Lire la clé API depuis le fichier config/API_KEY
with open('config/API_KEY', 'r') as file:
API_KEY = file.read().strip()
with open(API_KEY_FILE_PATH, 'r') as file:
API_KEY = file.read()

SEARCH_URL = 'https://www.googleapis.com/youtube/v3/search'
VIDEO_URL = 'https://www.youtube.com/watch?v='
Expand Down

0 comments on commit 4aff6e6

Please sign in to comment.