Skip to content

zeel-codder/videos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video fetcher

About

API to fetch latest videos of football category from YouTube.

Tech and Apis Used

  • Django
  • YouTube data v3 API
  • Html, Css and Js

Setup

Step 1: Install the virtualenv package by runninng

pip install virtualenv

Step 2: Create the virtualenv by runninng

virtualenv -p python3 videos_venv

Step 3: Install all packages

pip install -r /path/to/requirements.txt

Step 4: Activate the virtualenv by runninng

source videos_venv/bin/activate

Step 5: Deactivate the virtualenv by simply runninng

deactivate

Step 6: Keep updating the requirements.txt if any new packages are installed by running

pip freeze > requirements.txt

To resume development post new pulls, always run pip install -r /path/to/requirements.txt to install the latest requirements.

Step 7: Run Cron Job. for more details

python manage.py crontab add

Step 8: Run Django Server

python manage.py runserver

App Functions

  1. Provide Api to get latest video of predefined query.
  2. Change Api Key Automatic if current key exhausted.
  3. Simple Home page to see latest videos.
  4. Video Output

output

Api Provided

  1. Get videos

    Method: Get

    url

    videos/<int:page>/<int:per_page_items>

    Params

    page: page number to get
    per_page_items: number of videos per page

    Response

    {
        "page": {
            "current": "Number-current page number",
            "has_next": "Boolean-if we have next page",
            "has_previous": "Boolean-if we have previous page"
        },
        "data": [
            {
                "id": "Id",
                "title": "String-Title of video",
                "description": "String -Description of video",
                "video_id": "String",
                "thumbnail": "URL",
                "publish_time": "Time",
                "channel_title": "String- Channel title"
            }
        ]
    }

Thank You

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published