PHPackages                             gregory-gerard/rutube - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. gregory-gerard/rutube

ActiveLibrary[Image &amp; Media](/categories/media)

gregory-gerard/rutube
=====================

RutubeM3U8Scrapper helps you to retrieve a list of HLS streams for a Rutube LiST video.

0.0.2(5y ago)531[2 PRs](https://github.com/Gregory-Gerard/RutubeM3U8Scrapper/pulls)PHPPHP ^7.0

Since Nov 17Pushed 3y ago4 watchersCompare

[ Source](https://github.com/Gregory-Gerard/RutubeM3U8Scrapper)[ Packagist](https://packagist.org/packages/gregory-gerard/rutube)[ RSS](/packages/gregory-gerard-rutube/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (1)Versions (5)Used By (0)

RutubeM3U8Scrapper
==================

[](#rutubem3u8scrapper)

RutubeM3U8Scrapper helps you to retrieve a list of HLS streams / M3U8 playlist of a Rutube LiST video, with those HLS streams you can **download a video**, **streaming it in your favorite video player** or whatever you want. You still need an account at Rutube LiST website, but you don't need anymore to watch an ad or answer to their quiz.

I've developed RutubeM3U8Scrapper for myself so it's maybe not very scalable and bug-proof, but I thought other people would need it!

Install
-------

[](#install)

Clone the repository

`git clone https://github.com/Gregory-Gerard/RutubeM3U8Scrapper.git`

Install dependencies (Guzzle) with composer

`composer install`

You also need PHP &gt;= 7.0 installed on your computer.

`apt install php`

Configuration
-------------

[](#configuration)

If you want to use RutubeM3U8Scrapper in your CLI, you need to configure it.

`cp config.example.php config.php` (duplicate config.example.php to config.php and update your config)

Add your login (which is a mobile number with a **+ and your international dialling code** in front of the mobile number) and password in `$credentials` array, this is required because of the design of Rutube LiST (RutubeM3U8Scrapper can't call Rutube LiST api without logging-in).

```
// example
$credentials = [
    'phone' => '+33611111111',
    'password' => 'some_strong_password'
];
```

How to use
----------

[](#how-to-use)

### CLI

[](#cli)

Simply run `rutube.php` with a video id, example:

`php rutube.php 26f9dfab263c80f22c16b0ef1c4b77ad`

`php rutube.php 6105209`

It should echo something like this

```
---------- 640x360 ----------
639000 kbp/s : https://video-317-2.pladform.ru/dive/video-1-102.rutube.ru/mv3SOw-5xvhgL76wizgT9Q/hls-vod/4qZW_DvQHxhg9fVlBGJ7Ow/1604812485/582/0x5000cca255e4e76a/8aa68a1ad46f4a93813fc4262947e5c3.mp4.m3u8?i=640x360_639
1151000 kbp/s : https://video-317-2.pladform.ru/dive/video-1-102.rutube.ru/KGKhKCy2lQA7dUbjY5SQ7g/hls-vod/sS5wrPPUnYso2djOGlVnkA/1604812485/128/0x5000cca255cc90a7/b9132563fe2f40c8b402b9da03c5b879.mp4.m3u8?i=640x360_1151

---------- 1280x720 ----------
1589000 kbp/s : https://video-317-2.pladform.ru/dive/video-1-102.rutube.ru/MlAfBdfHOeX7fVXi1jt5cA/hls-vod/KL41UzT4qJ58DHZ4NlpVcw/1604812485/119/0x500003970b88170e/3750791273114be1ae6d57a434f1c2a1.mp4.m3u8?i=1280x720_1589

```

---

### Programmatically

[](#programmatically)

For documentation, check RutubeScrapper.php code, full example :

```
$scrapper = new RutubeScrapper();
$scrapper->login('+33367358878', 'f*riaa');
$internalVideoId = $scrapper->video('26f9dfab263c80f22c16b0ef1c4b77ad');
$award = $scrapper->award($internalVideoId);

foreach($scrapper->streamList($internalVideoId, $award) as $resolution => $bandwidthList) {
    echo PHP_EOL."---------- {$resolution} ----------".PHP_EOL;

    foreach ($bandwidthList as $bandwidth => $url) {
        echo "{$bandwidth} Kbps : {$url}".PHP_EOL;
    }
}
```

`$instance->streamList()` return a multidimensional array on two levels, with the resolution and the different bandwidths for each resolution with its url :

```
$streamList = [
    '640x360' => [
        639000 => 'https://video-317-2.pladform.ru/dive/video-1-102.rutube.ru/uPbtg49VskvVH_yBfl7WKQ/hls-vod/Sr4PXLRXagAb0vBftkax1A/1604813503/582/0x5000cca255e4e76a/8aa68a1ad46f4a93813fc4262947e5c3.mp4.m3u8?i=640x360_639',
        1151000 => 'https://video-317-2.pladform.ru/dive/video-1-102.rutube.ru/L6Knb9JNjMYm7GRL4VK3LA/hls-vod/G-z2JhlM10AFGeePdlS6Zg/1604813503/128/0x5000cca255cc90a7/b9132563fe2f40c8b402b9da03c5b879.mp4.m3u8?i=640x360_1151',
    ],
    '1280x720' => [
        1589000 => 'https://video-317-2.pladform.ru/dive/video-1-102.rutube.ru/WQJWM8YqYYMqyUGDI4xnxQ/hls-vod/zPao-gq6pwNB8rmrtC1Fsw/1604813503/119/0x500003970ba81d10/3750791273114be1ae6d57a434f1c2a1.mp4.m3u8?i=1280x720_1589',
    ],
];
```

If an internal error occurs, RutubeScrapper throw a RutubeScrapperException. Otherwise, if it's a request error (like a 404 or bad request) a GuzzleException is thrown.

Use cases
---------

[](#use-cases)

Now with the HLS streams in your possession, you can download a Rutube LiST video with [youtube-dl](https://github.com/ytdl-org/youtube-dl), ffmpeg or streaming it in VLC.

```
youtube-dl -f "mp4" -o "Space Brothers 33.mp4" "https://video-317-2.pladform.ru/dive/video-1-2.rutube.ru/IgolYMB5FHGfVQMBihCISQ/hls-vod/EDXmlhyHtldODsup54cZ5g/1588904466/137/0x5000cca255cd3578/46e0da024e694e99be6529211ccdfc96.mp4.m3u8?i=1280x720_1590"

```

How it works
------------

[](#how-it-works)

I did some reverse engineering into Rutube LiST network trace, so the scrapper code simply makes the same calls that a user makes when watching a video, to describe more precisely (you can also read RutubeScrapper.php):

- First of all, the scrapper need to be logged ;
- The scrapper retrieve the internal video id, that is sometimes different from the id you have in your possession, sometimes not ;
- To retrieve Rutube video balancer, Rutube API ask for an « award token », this award token is given by Rutube ads or Rutube quiz ;
- So, the scrapper call Rutube ads API to retrieve directly your « award token » without watching anything ;
- Then it simply echo the video balancer of your video.

To-Do
-----

[](#to-do)

- Update RutubeM3U8Scrapper into a class

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2053d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/56580353?v=4)[Grégory Gérard](/maintainers/gregory-gerard)[@Gregory-Gerard](https://github.com/Gregory-Gerard)

---

Top Contributors

[![Gregory-Gerard](https://avatars.githubusercontent.com/u/56580353?v=4)](https://github.com/Gregory-Gerard "Gregory-Gerard (8 commits)")

---

Tags

downloadhls-streamsm3u8phprutuberutube-listvideo

### Embed Badge

![Health badge](/badges/gregory-gerard-rutube/health.svg)

```
[![Health](https://phpackages.com/badges/gregory-gerard-rutube/health.svg)](https://phpackages.com/packages/gregory-gerard-rutube)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
