Skip to main content

Get YouTube data for analysis

Project description

Youtube-Info

Make YouTube queries and get text information from videos (including captions) ready for Jupyter Notebooks.

Installation

pip install youtubeinfo

USAGE

Create a search object

import youtubeinfo.core as yt
yt_search = yt.search("Test", developer_key=<YOUTUBE_DEVELOPER_KEY>)
yt_search.df  # DataFrame with YouTube info (likes, views, title, etc.)

Developer key

YOUTUBE_DEVELOPER_KEY has to be created following https://developers.google.com/youtube/registering_an_application?hl=en and can be set as environment variable

Developer key as environment variable

Linux: edit ~/.profile and add as last line of code

export YOUTUBE_DEVELOPER_KEY=<YOUTUBE_DEVELOPER_KEY>

Captions

To get captions, use the argument captions=True

import youtubeinfo.core as yt
# YOUTUBE_DEVELOPER_KEY is not necessary if was set as environment variable
yt_search = yt.search("Test", caption=True)  
yt_search.df  # A new column with captions "video_caption" will appear

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtubeinfo-0.1.3.tar.gz (16.1 kB view hashes)

Uploaded Source

Built Distribution

youtubeinfo-0.1.3-py3-none-any.whl (16.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page