GithubHelp home page GithubHelp logo

axc836 / python-youtube-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from srcecde/python-youtube-api

0.0 0.0 0.0 48 KB

A basic Python YouTube v3 API to fetch data from YouTube using public API-Key without OAuth

License: GNU General Public License v3.0

Python 99.45% Makefile 0.55%

python-youtube-api's Introduction

Python YouTube API

A basic Python YouTube v3 API to fetch data from YouTube using public API-Key without OAuth.

It can fetch video comments for a given video URL, keyword based search (returns videos, playlist, channel) and return videos data for a given channelId. It store the data into output directory in CSV files.

You are required to get the API key from Google API console in order to use this script

Install Dependencies

  • pip3 install -r requirements.txt

How to use

  • Pass --c after file name for fetching comments from videos
  • Pass --s after file name for fetching results based on search keyword
  • Pass --sc after file name for fetching videos based on YouTube ChannelId

It is mandatory to pass any of the above argument after file name

Video Comments

  • --max argument for defining the maximum result to return (default=10)
  • --videourl argument for defining the youtube URL Mandatory
  • --key argument for defining API key Mandatory
Example: python3 main.py --c --max 10 --videourl https://www.youtube.com/watch?v=y_j-r8x1FtI --key AAAAAAA

Search by Keyword

  • --max argument for defining the maximum result to return (default=10)
  • --search argument for giving the keyword
  • --r argument for defining region (Country) For ex. --r=IN (Argument should be a country code)
  • --key argument for defining your developer API key Mandatory
Example: python3 main.py --s --search "srce cde" --max 10 --key AAAAAAA

Search Videos by YouTube ChannelId

  • --max argument for defining the maximum result to return (default=10)
  • --channelid argument for defining channel id Mandatory
  • --key argument for defining your developer API key Mandatory
Example: python3 main.py --sc --channelid UCwDlyuX3Fkg5WNBufLnH6dw --max 10 --key AAAAAAA

YouTube API v3

python-youtube-api's People

Contributors

srcecde avatar kairat-beep 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.