定制 nehalvpatel/periscope-downloader 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nehalvpatel/periscope-downloader

最新稳定版本:1.0.1

Composer 安装命令:

composer require nehalvpatel/periscope-downloader

包简介

PHP script to download videos from Periscope

README 文档

README

PHP script to download videos from Periscope

Ported from a batch script made by Abnormal Nik

Installation

Add the package to your composer file:

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:

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:
}

统计信息

  • 总下载量: 367
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-28