Git Product home page Git Product logo

youtube_search's Introduction

Project Goal

To make an API to fetch latest videos sorted in reverse chronological order of their publishing date-time from YouTube for a given tag/search query in a paginated response.

Tech Stack

  • Django
  • Django Rest Framework
  • YouTube data v3 API
  • HTML
  • CSS
  • Dockerfile

Setup and Deployment

  • Download Docker desktop app from Here

  • To deploy this project, clone the repository

  git clone https://github.com/Lekhanshlkr/youtube_search.git
  • Go to the folder
  cd youtube_search
  • Modify settings.py File - Remove the existing key and add your own YouTube Data API key. Get a new API key from Here
  YOUTUBE_DATA_API_KEY = <YOUR_KEY>
  • Run the commands in commands.txt file in the given order.

How to Use

  • Post Deployment, Go to Dashboard

  • You can search for the videos from the search tab.

  • On clicking Youtube Search, it will show the first 9 videos in reverse chronological order of their publishing date-time.

  • On clicking See all videos in table, you will be redirected to the Rest Framework page where you can see all the stored videos in a paginated view with searching and sorting options.

Screenshots

HomePage
Search Results
Videos List View
Search and Filter Options
Database View in admin panel
API Usage Panel in Google Console

Further Optimizations

  • The API can be called continuously in background with some interval using asyncio and instead of fetching 9 results, it can be limited to 1-2 results per call.

  • The search parameter publishedAt can be set to less than '30 minutes from current time' so that everytime the API is called, it only displays the results of videos which have been published in the last 30 minutes.

  • A support for supplying multiple API keys can be added by supplying a 'list' in the YOUTUBE_DATA_API_KEY variable and then running a 'try except' block to check whether the API has been fully exhausted or not.

  • Larger databases such as PostgreSQL and MySQL can be used for handling large amounts of data storage.

  • A job queue call using Celery can be implented, to handle multiple 'GET' request at the same time.

Feedback

If you have any feedback, please reach out to me at [email protected]



forthebadge

youtube_search's People

Contributors

lekhanshlkr avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.