视频平台解析器
发布日期:作者: Paul Redmond
由 @chojnicki 开发的视频平台解析器 PHP 包,是一个易于使用的 SDK,支持 YouTube、Dailymotion、Facebook 等多个平台。
API 使用简单,您可以像这样获取视频信息
$info = $parser->get('https://www.youtube.com/watch?v=jofNR_WkoCE');
以下是一些 Dailymotion 的示例输出,与您在任何支持的平台上看到的类似数据
>>> \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, ]
截至撰写本文时,该包支持以下平台
- YouTube
- Dailymotion
- LiveLeak
- CDA
- Vimeo
您可以在 GitHub 上的 chojnicki/video-platforms-parser 了解更多关于该包的信息,获取完整的安装说明,并查看源代码。