This is a demo project for Scrapping Youtube channel.
It was made using Python 3.8 + Django 4 and database is MySQL.
[Optional] Install virtual environment:
$ python -m virtualenv env
[Optional] Activate virtual environment:
On macOS and Linux:
$ source env/bin/activate
On Windows:
$ .\env\Scripts\activate
Install dependencies:
$ pip install -r requirements.txt
Create .env
file into root directory or the project and set variables with appropriate value.
You can run the application from the command line with manage.py. Go to the root folder of the application.
Run migrations:
$ python manage.py migrate
Scrap channel data:
$ python manage.py channel_scrapper
Run server on port 8000:
$ python manage.py runserver 8000
Go to the web browser and visit http://localhost:8000/api/videos
Filter by tag name:
http://localhost:8000/api/videos?tags=python
Activate virtual environment:
On macOS and Linux:
$ source env/bin/activate
On Windows:
$ .\env\Scripts\activate
Running tests:
$ python manage.py test utube