robinflyhigh/tubestrip

YouTube Crawler

v0.1.5 2020-07-08 18:35 UTC

This package is auto-updated.

Last update: 2024-10-18 20:58:52 UTC


README

Simple youtube scraper

Version Total Downloads License codecov

early development

Features

  • Search Youtube
  • Get a video title, description, view count, and published date from a Youtube ID

Installation

Install tubestrip with composer:

composer require robinflyhigh/tubestrip

Examples

<?php
use acidjazz\tubestrip\TubeStrip;

$ts = new TubeStrip();
$results = $ts->search('GETV ANSI Show');
dump($results);
array:20 [▼
  0 => {#3768 ▼
    +"id": "r_cYOi3pnhA"
    +"title": "GETV: ANSI Art for the Masses"
  }
...
<?php
use acidjazz\tubestrip\TubeStrip;

$ts = new TubeStrip();
dump($ts->get('r_cYOi3pnhA');
{#1588 ▼
  +"title": "GETV: ANSI Art for the Masses"
  +"description": """
    Back before there was the Internet, early caveman dialed into computer bulletin board systems or BBSes to get their online fix. Many of these boards distinguish ▶

    Originally posted:
    http://www.geekentertainment.tv/2008/...
    """
  +"viewCount": 55585
  +"date": "Feb 9 2008"
}