https://github.com/zerefwayne/protube
A youtube API which fetches and stores videos of your favourite topic.
https://github.com/zerefwayne/protube
Last synced: over 1 year ago
JSON representation
A youtube API which fetches and stores videos of your favourite topic.
- Host: GitHub
- URL: https://github.com/zerefwayne/protube
- Owner: zerefwayne
- Created: 2020-02-11T18:06:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-05T21:01:07.000Z (about 6 years ago)
- Last Synced: 2025-01-22T07:17:16.691Z (over 1 year ago)
- Language: Python
- Size: 114 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Protube
A youtube API which fetches and stores videos of your favourite topic.
## About the Project
The project is built on Django framework and uses Djangorestframework (DRF) for running its REST API and Celery to run the background task. The search is query is set to "cricket" by default.
To manage API Keys, there is a seperate API Manager which is responsible for maintaining API keys and their status in the database. User can add his own API Key and celery will automatically pick it up.
## Installation
### Libraries Included
- Django Rest Framework
- Celery (Background tasks)
- Database: Inbuilt sqlite
### How to run the project?
- python3 -m venv env
- source activate ./env/bin/activate
- pip3 install -r requirements.txt
#### Running background service:
Open two different terminals and run the following tasks in each one of them:
- celery -A protube worker -l info
- celery -A protube beat -l info
#### Running django backend server:
- ./manage.py runserver
#### Accessing the server:
- Before running the celery tasks, make sure to add your API key of Youtube Data v3 API to the database via localhost:8000/apikeys.
- To add new API Keys, head over to http://localhost:8000/apikeys/ and add your own API key generated by the GCP.
- To fetch the videos, go to http://localhost:8000/videos