Download the PHP package pazakharov/yii2-youtube-captions-scraper without Composer

On this page you can find all versions of the php package pazakharov/yii2-youtube-captions-scraper. 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 yii2-youtube-captions-scraper

Youtube Scraper

The Youtube Scraper is a PHP package that allows you to scrape captions and subtitles from Youtube videos. It uses the Yii 2 framework and the Guzzle HTTP client to make requests to the Youtube API.

Installation

You can install the Youtube Scraper using Composer:

Usage

To use the Youtube Scraper, you first need to create an instance of the YoutubeScraper class and set the languageCode property to the language code of the captions you want to scrape. You can then use the getCaptionsBaseUrl and getSubtitles methods to retrieve the base URL and subtitles, respectively.

Here's an example usage:

In this example, we're scraping the captions (subtitles) for the video with the ID wNzql5TZ-i. The getCaptionsBaseUrl method returns the base URL for the captions, which we then pass to the getSubtitles method to retrieve the subtitles.

Note that the getSubtitles method returns an array of strings, where each string represents a subtitle. You can then use this array to display the subtitles in your application.

For use proxy use .env var HTTPCLIENT_PROXY=http://login:password@domain:port or you can configure and provide own instance of Client to YoutubeScraper class.

Testing and Contributing

The Youtube Scraper includes a test suite to ensure that it works correctly. You can run the tests using the phpunit command:

This will run the test suite and output the results.

The Youtube Scraper follows the PSR-2 coding standards. You can check the code for compliance using the phpcs command:

Fix code by phpcbf

License The Youtube Scraper is licensed under the MIT license. You can use it free of charge and without any restrictions.


All versions of yii2-youtube-captions-scraper with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
yidas/yii2-composer-bower-skip Version *
yiisoft/yii2 Version ~2.0.45
yiisoft/yii2-httpclient Version ^2.0
illuminate/support Version ^8.83
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 pazakharov/yii2-youtube-captions-scraper contains the following files

Loading the files please wait ....