bibekchand / playlist-duration-

Assignment Notes sabai hunxa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

This python script is based on the Youtube data api. This script in particular returns you with the duration of a playlist. For accessing the duration of the playlist you require two things.

  1. Your own personal api key
  2. The playlist id which will be available in the url.

How to use

You can use the script as follows:

  1. First install the package using:
    pip install -i https://test.pypi.org/simple/ playlistwrapper==0.0.4
  2. Now, you have to import the package in your code:
    from playlistwrapper.playlist import youtube
  3. Create an object instance for it and pass in the key and the playlist id in double quote as such:
    first = youtube("your-key", "playlist id")
  4. Call the method totalduration as such:
    duration = first.totalduration()
  5. You can also get the video ids of all the videos by calling the method getVideos:
    videos = first.getVideos()

Note

This is just a passion project. Google already has a very well coded and documented python client for all of its services google api client

About

Assignment Notes sabai hunxa

License:MIT License


Languages

Language:Python 100.0%