Skip to main content

A Python package to fetch video statistics from a YouTube channel

Project description

YouTubeAnalytics

YouTubeAnalyticsは、YouTubeチャンネルのビデオ統計を取得するためのPythonパッケージです。このパッケージは、YouTube Data API V3を使用して、特定のチャンネルのビデオのタイトルと視聴回数を取得します。

インストール

このパッケージはPyPIからインストールできます:

pip install YouTubeAnalytics

使用方法

まず、YouTubeAnalyticsクラスをインポートし、APIキーを使用してインスタンスを作成します:

from YTAnalytics import YouTubeAnalytics
yt_analytics = YouTubeAnalytics(api_key="your_api_key")

次に、get_channel_videosメソッドを使用して、特定のチャンネルのビデオ統計を取得します:

このメソッドは、指定したチャンネルの全てのビデオのタイトルと視聴回数を含むリストを返します。また、days_limitパラメータを指定することで、過去特定の日数のビデオのみを取得することも可能です:

video_stats = yt_analytics.get_channel_videos(channel_id="your_channel_id")

video_stats = yt_analytics.get_channel_videos(channel_id="your_channel_id", days_limit=30)

この場合、過去30日間にアップロードされたビデオのみが取得されます。

注意事項

このパッケージはYouTube Data API V3を使用しています。そのため、使用するにはYouTube Data API V3のAPIキーが必要です。APIキーは、Google Cloud Consoleから取得できます。

また、このパッケージを使用する際は、YouTubeの利用規約と著作権法を遵守してください。具体的な使用方法や制限については、YouTube Data APIの公式ドキュメンテーションを参照してください。

ライセンス

このパッケージはMITライセンスの下で公開されています。詳細はLICENSEファイルをご覧ください。

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

YouTubeAnalytics-0.1.5.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

YouTubeAnalytics-0.1.5-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file YouTubeAnalytics-0.1.5.tar.gz.

File metadata

  • Download URL: YouTubeAnalytics-0.1.5.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.4

File hashes

Hashes for YouTubeAnalytics-0.1.5.tar.gz
Algorithm Hash digest
SHA256 7c23285138375bf9870f7185aea5068f9ba4a645725520d75d09d8d85ce5dc92
MD5 af1c131dde9a4621a2eed7c80bbd3b38
BLAKE2b-256 f56f8d9ab61ecc5909a47bae8463a6b0e07d942f4a9bcfc138af77372f839cca

See more details on using hashes here.

File details

Details for the file YouTubeAnalytics-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for YouTubeAnalytics-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 14191de468d5449df85da68e0b99414e053616efd16dc0511cde8dec6528fe65
MD5 ce20992dc7b0acd022493683d865f295
BLAKE2b-256 7999c4ae219ba7ab9c33370c21643220f583fba132c1eb057e1392bd326f33ce

See more details on using hashes here.

Supported by

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