A Small Search engine which searches Youtube.com for videos and saves it to Database
- Python 3.6+
- UNIX operating System
-
Create a Virtual env as
python3 -m venv <VIRTUAL_ENV_NAME>- Change directory to the env
cd <VIRTUAL_ENV_NAME>
- Change directory to the env
-
Clone the Repository inside Virtual environment :-
git clone git@github.com:programmeranand/YoutubeVideoSearch.git- Activate virtual environment
source bin/activate - Change Directory to cloned repo
cd YoutubeVideoSearch
- Activate virtual environment
-
Install Requirements file :-
pip install -r requirements.txt -
Run Migrations
python3 manage.py migrate -
Create Super User in DB :-
python3 manage.py createsuperuser- Enter username and Password
-
Adding Credentials :-
-
Run the server :-
python3 manage.py runserver, server will run at :- http://127.0.0.1:8000/ -
Open
http://127.0.0.1:8000/admin/videosearch/setting/and add following credentials- FETCH_VIDEO_KEYWORDS :- Enter Keyword to search for e.g
Programming - FETCH_VIDEO_MAX_RESULTS :- Max Results to Fetch from Youtube Data API V3 e.g
30 - FETCH_VIDEO_PUBLISHED_AFTER :- Timestamp in ISO Format, e.g
2019-01-01T00:00:00
- FETCH_VIDEO_KEYWORDS :- Enter Keyword to search for e.g
-
Add Youtube Data API credentials :-
- Open
http://127.0.0.1:8000/admin/integrations/youtubecredentials/ - Add API_Key, and set is_active to True by clicking on it
- Open
Exit the Server by Pressing Ctrl+C
-
-
Adding the CRON JOB Scheduling :-
python3 manage.py crontab add -
Running the Server :-
python3 manage.py runserver
- Check Objects in DB :-
http://127.0.0.1:8000/admin/videosearch/youtubevideo/ - Using GET API request :-
http://127.0.0.1:8000/videos/
- Kindly Enter only valid API Credentials ans set
is_activeto True - For issues send an Email to
ankit.anand.95@gmail.com