bluelyte / imdb-client
基于 Symfony 组件的 IMDB 抓取器。
dev-master
2013-05-08 01:03 UTC
Requires
- php: >=5.3.3
- fabpot/goutte: 1.0.*@dev
This package is not auto-updated.
Last update: 2024-09-14 13:42:15 UTC
README
基于 Symfony 组件的 IMDB 抓取器。
免责声明:该项目未经 IMDB 批准、关联或旨在侵犯 IMDB 的权利,仅用于非商业目的(即个人用途)。
安装
推荐的安装方法是 通过 composer。
{ "require": { "bluelyte/imdb-client": "1.0.0" } }
使用方法
<?php require __DIR__ . '/vendor/autoload.php'; $client = new \Bluelyte\IMDB\Client\Client(); // Numb3rs - http://www.imdb.com/title/tt0433309/ $id = 'tt0433309'; $showInfo = $client->getShowInfo($id); $episodes = $client->getSeasonEpisodes($id, $showInfo['lastSeason']); var_dump($episodes); /* Output: array(16) { [1] => array(3) { 'title' => string(7) "Hangman" 'airdate' => string(10) "2009-09-25" 'description' => string(126) "The team tries to protect an activist from a sniper, while Charlie and Amita try to keep his proposal and her answer a secret." } [2] => array(3) { 'title' => string(13) "Friendly Fire" 'airdate' => string(10) "2009-10-02" 'description' => string(156) "Charlie and the team investigate a shootout involving a bank robber, but when the science doesn't match the stories suspicion falls on one of Don's mentors." } ... } */
许可证
在 BSD 许可证下发布。请参阅 LICENSE
。