GithubHelp home page GithubHelp logo

ash04-creater / youtube-intermediary-search Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 30.17 MB

A server that will provide apis to perform a secondary search on the database of videos fetched via Youtube Search APIs.

Python 100.00%
flask python sqlalchemy youtube-data-api-v3

youtube-intermediary-search's Introduction

Youtube Intermediary Search


The backend has been divided into two parts : client_server and microservice.

Firstly, the microservice needs to be run (which will trigger the youtube_data_api every 10 seconds and the videos will be stored in the database) and then the client_server needs to be run will connect the apis with the postgresql database


Setup for both the modules

A virtual environment needs to be created :

py -m venv env
.\env\Scripts\activate

Dependencies needs to be installed :

pip install -r requirements.txt


microservice

The variables.ini file should be configured with the databse credentials and the youtube data api's developer key.

The following commands needs to be executed :

py createTable.py ---> To create the database table
py insertTable.py ---> To store the youtube api response in the databse periodically


client_server

A .env file needs to be created with stores the SQLALCHEMY_DATABASE_URI and the SCHEMA_NAME

For example,

SQLALCHEMY_DATABASE_URI ="postgresql://postgres:[email protected]:5432/postgres"
SCHEMA_NAME ="public"

Then the following command needs to be executed :

py run.py ---> To run the flask server

Two apis are available here .

get() --> To get the paginated response of the videos added in the database

The get() api is called by requesting response at http://127.0.0.1:5000/get/pageNumber

where pageNumber should be integer page no.s

Sample url : http://127.0.0.1:5000/get/2

search_video() --> To get the search result from the database

The search_video() api is called by requesting response at http://127.0.0.1:5000/search/video/searchKey

where searchKey should be string input

Sample url : http://127.0.0.1:5000/search/video/virat$kohli

youtube-intermediary-search's People

Contributors

ash04-creater 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.