Skip to content

A python app which searchs predefined query on YouTube using YT Data API and saves it in MongoDB and lists it on dashboard.

Notifications You must be signed in to change notification settings

abskrj/youtube-video-lister

Repository files navigation

YouTube Video Lister

Open Source? Yes! GitHub stars GitHub forks GitHub contributors GitHub issues GitHub pull-requests

A python app that searches a predefined query on YouTube using YT Data API and saves it in MongoDB and lists it on the dashboard.

It searches asynchronously in backgroud using Python asyncio and threading library.

Predefined search query: "game"

Time Interval for searching: 60sec

Table of Contents

Starting Server Locally

git clone https://github.com/abhishekraj272/youtube-video-lister.git

cd youtube-video-lister

pip3 install -r requirements.txt

# Set Env Var: MONGODB_URI, TotalAPISet, YTAPIKey1, YTAPIKey2, YTAPIKey3....
# TotalAPISet = count(  YTAPIKey1, YTAPIKey2, YTAPIKey3.... ) 

flask run 
# OR
gunicorn run:app

Deploying on Heroku

heroku login

heroku create

heroku config:set MONGODB_URI=<MONGODB_URI>
heroku config:set TotalAPISet=<TotalAPISet>
heroku config:set YTAPIKey1=<YTAPIKey1>
.
.
.

git push heroku master

heroku open

Features

  1. Shuffles through the provided API Key set every time it searches.
  2. View function is cached for 60sec for every args provided.
  3. Sort & Filter Options are provided.
  4. The data fetched from YT are latest.

Queries Available

  • ?invertList=
  • ?maxResults=
  • ?sortBy=
  • ?start=

Tools Used

  1. Flask
  2. Pymongo
  3. Flask Caching
  4. HTML, CSS & JS
  5. os, random, datetime, requests, asyncio, json libraries

Note: Mini YT LOL is running on a Free Tier MongoDB and Heroku server.

Screenshot Screenshot

Live: Mini YT LOL - Hosted on Heroku

Development

Want to contribute? Great!

This repository is the starter code for you. Therefore, I would like to accept your pull requests 😎

test test test!!

About

A python app which searchs predefined query on YouTube using YT Data API and saves it in MongoDB and lists it on dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published