2017 © Pedro Peláez
 

library periscope-downloader

PHP script to download videos from Periscope

image

nehalvpatel/periscope-downloader

PHP script to download videos from Periscope

  • Monday, August 31, 2015
  • by nehalvpatel
  • Repository
  • 2 Watchers
  • 10 Stars
  • 284 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Periscope Downloader

PHP script to download videos from Periscope, (*1)

Ported from a batch script made by Abnormal Nik, (*2)

Installation

Add the package to your composer file:, (*3)

composer require nehalvpatel/periscope-downloader "1.*"
composer update

Usage

<?php

require_once("vendor/autoload.php");

use nehalvpatel\PeriscopeDownloader;

$url = "https://www.periscope.tv/w/aLNeFzcxNTU4OTB8MU93eFdqV2JMWG5KUYZyGwCPkFvgC3JUE0AN9NhEjC-hHOCPBg1HCrUoiMxg";

$periscope_downloader = new PeriscopeDownloader();
echo $periscope_downloader->download($url); // returns location of combined .ts file

Arguments

$url = "https://www.periscope.tv/w/aLNeFzcxNTU4OTB8MU93eFdqV2JMWG5KUYZyGwCPkFvgC3JUE0AN9NhEjC-hHOCPBg1HCrUoiMxg";
$directory = "/path/to/save/folder"; // defaults to __DIR__
$filename = "my_periscope.ts"; // defaults to $username_$date.ts

$periscope_downloader->download($url, $directory, $filename);

Error Handling

The class will throw an Exception when it encounters an error. Use these error codes to identify what went wrong:, (*4)

try {
    $periscope_downloader->download($url);
}
catch (\Exception $e) {
    switch ($e->getCode() {
        case 1:
            echo "Unsupported URL";
            break;
        case 2:
            echo "Invalid watchonperiscope.com URL";
            break;
        case 3:
            echo "Invalid Periscope token";
            break;
        default:
}

The Versions

31/08 2015

dev-master

9999999-dev

PHP script to download videos from Periscope

  Sources   Download

MIT

The Requires

 

31/08 2015

1.0.1

1.0.1.0

PHP script to download videos from Periscope

  Sources   Download

MIT

The Requires

 

29/08 2015

1.0.0

1.0.0.0

PHP script to download videos from Periscope

  Sources   Download

MIT

The Requires