Download the PHP package aronpc/youtube-comments without Composer

On this page you can find all versions of the php package aronpc/youtube-comments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package youtube-comments

YouTube Comments for Laravel

A Laravel package to download YouTube comments without using API keys, utilizing yt-dlp as the backend for extraction.

Requirements

Installation

  1. Install the package via Composer:

  2. The package will be automatically discovered by Laravel.

  3. Publish the configuration file:

  4. Install yt-dlp (if not already installed):

  5. Configure the package in config/youtube-comments.php if needed.

Usage

Using Artisan Commands

This package provides several Artisan commands to interact with YouTube comments and live chat.

Fetch Comments (All-in-one)

To fetch comments from a YouTube video in a single step (download and parse), use the following command:

Replace VIDEO_ID with the ID of the YouTube video. For example:

This will generate a file in the configured output directory named comments_VIDEO_ID.txt containing all the comments from the video.

Fetch Live Chat

To fetch live chat from a YouTube video that had a live stream, use:

This will generate a file in the configured output directory named livechat_VIDEO_ID.txt containing all the live chat messages from the video.

Fetch Both Comments and Live Chat

To fetch both comments and live chat in a single operation, use:

This will generate two files in the configured output directory:

If either comments or live chat are not available for the video, the command will still succeed but will display a warning message.

Download Comments Only

If you want to only download the comments and save them as a JSON file (useful for debugging), use:

This will generate a file in the configured output directory named comments_VIDEO_ID.json containing the raw JSON data.

Parse Comments Only

To parse previously downloaded comments from a JSON file, use:

This command expects a file named comments_VIDEO_ID.json to exist in the configured output directory.

Using the Facade

You can also use the provided facade to interact with the YouTube client directly in your code:

Output Format

The parsed comments are saved in a text file with the following format:

How It Works

  1. The application uses yt-dlp to download the comments from the YouTube video
  2. It processes the JSON data and formats the comments
  3. The formatted comments are saved to a text file in the output directory

Configuration

The package configuration file is located at config/youtube-comments.php after publishing. It includes the following options:

You can customize these settings by editing the configuration file or by setting the corresponding environment variables in your .env file.

Testing

The package includes a comprehensive test suite built with PHPUnit. The tests cover the main functionality of the package, including:

Running Tests

If you want to run the tests for this package, you can clone the repository and run:

Troubleshooting

License

This package is open-sourced software licensed under the MIT license.


All versions of youtube-comments with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
illuminate/support Version ^12.0
symfony/process Version ^7.2.5
symfony/console Version ^7.2
vlucas/phpdotenv Version ^5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aronpc/youtube-comments contains the following files

Loading the files please wait ...