# Kinopoiskpy
[](https://pypi.python.org/pypi/kinopoiskpy) [](https://circleci.com/gh/ramusus/kinopoiskpy) [](https://coveralls.io/r/ramusus/kinopoiskpy) [](https://travis-ci.org/ramusus/kinopoiskpy) [](https://coveralls.io/r/ramusus/kinopoiskpy)
This package is pythonic API to kinopoisk.ru website.
## Installation
To install the latest version using pip:
$ pip install kinopoiskpy
## Example usage
Search movies:
>>> from kinopoisk.movie import Movie
>>> movie_list = Movie.objects.search('Redacted')
>>> len(movie_list)
1
>>> print movie_list[0].title
Без цензуры
>>> print movie_list[0].id
278229
Get content of movie by ID:
>>> from kinopoisk.movie import Movie
>>> movie = Movie(id=278229)
>>> movie.get_content('main_page')
>>> movie.year
2007
>>> movie.title
u'Без цензуры'
>>> movie.title_en
u'Redacted'
>>> movie.plot
u'В центре картины - небольшой отряд американских солдат на контрольно-пропускном пункте в Ираке. Причём восприятие их истории постоянно меняется. Мы видим события глазами самих солдат, представителей СМИ, иракцев и понимаем, как на каждого из них влияет происходящее, их встречи и столкновения друг с другом.'
>>> movie.runtime
90
>>> movie.tagline
u'"Фильм, запрещенный к прокату во многих странах"'
>>> movie.rating
8.5
>>> movie.get_content('posters')
>>> len(movie.posters) > 0
True
Get content of person by ID:
>>> from kinopoisk.person import Person
>>> person = Person(id=6245)
>>> person.get_content('main_page')
>>> person.id
6245
>>> person.name
u'Джонни Депп'
>>> person.year_birth
1963
>>> person.name_en
u'Johnny Depp'
>>> len(person.information) > 50
True
>>> person.get_content('photos')
>>> len(person.photos) > 10
True
## Testing
By default, all communication with kinopoisk.ru is recorded in special files called cassettes (see vcrpy-unittest). To reproduce real requests to kinopoisk.ru just delete directory kinopoisk/tests/cassettes/ with all it’s content.
Run all tests:
$ python -W ignore -m kinopoisk.tests
Run particular test:
$ python -W ignore -m kinopoisk.tests -v MovieTest.test_movie_cast
## Contributors
[Alex Rembish](http://github.com/rembish)
Metadata
Release files for kinopoiskpy 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kinopoiskpy-0.9.0.tar.gz | 3.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kinopoiskpy-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.9 MB
Release files / kinopoiskpy-0.9.0.tar.gz
| Download URL | kinopoiskpy-0.9.0.tar.gz |
|---|---|
| Size | 3.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d7d2f471dad669028b0982847c9372786e07284db5f14544a1a9a814689e7e5
|
|
BLAKE2b-256 checksum How to use checksums |
1de324de05fa4f723b2c1bd66a64c9fe485ef675fb1c1a024038763d1c2ce73f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|
Release files / kinopoiskpy-0.9.0-py3-none-any.whl
| Download URL | kinopoiskpy-0.9.0-py3-none-any.whl |
|---|---|
| Size | 3.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7b171d1b98bcdab8043cd4f5d9ced0ebd9d3484f72bab2cf07c25b8535fbb91
|
|
BLAKE2b-256 checksum How to use checksums |
48daa058f3197a40fe5860c0f70ca4d20c6de7d5642bc3457a811e633e8d3416
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0
|