Video Platforms Parser

News

September 13th, 2019

The Video Platforms parser PHP package by @chojnicki is an easy-to-use SDK for multiple platforms like YouTube, Dailymotion, Facebook, and more.

The API usage is simple, you can get video info like this:

$info = $parser->get('https://www.youtube.com/watch?v=jofNR_WkoCE');

Here’s some sample output from Dailymotion, which is similar data you’ll see from any supported platform:

>>> \VideoPlatformsParser::get('https://www.dailymotion.com/video/x6qac05?playlist=x5xlnc');
=> [
     "id" => "x6qac05",
     "platform" => "dailymotion",
     "title" => "Simon Pegg on His Most Iconic Characters",
     "description" => "Simon Pegg breaks down his favorite and most iconic characters, including Tim from "Spaced," Shaun from "Shaun of the Dead," Nicholas Angel from "Hot Fuzz," Gary King from "The World's End," Scotty in "Star Trek," Unkar Plutt in "Star Wars: The Force Awakens," and Benji Dunn in the "Mission: Impossible" movies. Simon stars in "Mission: Impossible - Fallout," out in theaters July 27th.",
     "thumbnail" => "https://s1.dmcdn.net/v/OGOr51TU0A1fJD7He",
     "tags" => [
       "celebrity",
       "iconic",
       "mission impossible",
       "simon pegg",
       "Season: Season 1",
       "Series: Iconic Characters",
     ],
     "api" => true,
   ]

At the time of writing this package supports the following platforms:

  • YouTube
  • Dailymotion
  • Facebook
  • LiveLeak
  • CDA
  • Vimeo

You can learn more about this package, get full installation instructions, and view the source code on GitHub at chojnicki/video-platforms-parser.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.