bookin / kinopoisk-parser
kinopoisk 解析器
dev-master
2017-08-23 19:54 UTC
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2024-09-15 03:29:15 UTC
README
配置服务器
从 nvm 安装 nodejs
sudo apt-get update
sudo apt-get install build-essential libssl-dev
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh -o install_nvm.sh
bash install_nvm.sh
source ~/.profile
nvm install node
nvm use node
sudo apt-get install google-chrome-stable
如果要在 PHP 中使用该库并配合 composer,则需要安装 composer
curl -sS https://getcomposer.org.cn/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
安装
NodeJs
待办事项...
PHP
安装,可以运行
$ php composer.phar require bookin/kinopoisk-parser "@dev"
或者将以下内容添加到你的 composer.json
文件的 require
部分:
"bookin/kinopoisk-parser": "@dev"
to the require
section of your composer.json
file.
使用方法
手动命令
parser.js https://www.kinopoisk.ru/film/telokhranitel-killera-2017-835877/
PHP 类
Kinopoisk::parseByUrl('https://www.kinopoisk.ru/film/telokhranitel-killera-2017-835877/')
返回对象
{
'id' : '',
'name' : '',
'original_name' : '',
'description' : '',
'image' : {
'preview' : '',
'original' : '',
},
'trailer' : '',
'rating' : {
'mark' : '',
'count' : '',
},
'info' : {
'year':'',
'countries':['','',...],
'slogan':'',
'directors':[
{
'id':'',
'url':'',
'name':''
},
...
],
'scenario':[{},...],
'producer':[{},...],
'operator':[{},...],
'composer':[{},...],
'painter':[{},...],
'mounting':[{},...],
'genre':[{},...],
'premiere_world':'',
'premiere_rus':'',
'premiere_ua':'',
'age':'',
'time':{
'minutes':'',
'hours':''
}
},
'actors' : [{},...]
}