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 YouTubeAnalytics 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.4.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.4-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: YouTubeAnalytics-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 876bdfb754e41dc1a9f18d59a437fb65f89a0fa1ec22c75638b281606c658760
MD5 02af55e5e95bf021b6fdb65b3e39aa63
BLAKE2b-256 bd819b0441fd5c689fa486c88abd734a0d2b57d573c69f1787f8f92ea2938ffd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for YouTubeAnalytics-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5ede87a8cc048108526302f65d8c18dac21ed510bf339b1b76cddeed168ed5a7
MD5 4944dae8fe50e9343a3c865a095d766d
BLAKE2b-256 231b0ce5737fc2a8ccba2d5352978cce9b5d535b8a4a3b6ff4f884e2bf74fb47

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