Skip to main content

Python API to kinopoisk.ru

Project description

PyPI version Circle CI Build Status Coverage Status

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

Contributors

Alex Rembish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kinopoiskpy-0.7.4.tar.gz (3.0 MB view details)

Uploaded Source

File details

Details for the file kinopoiskpy-0.7.4.tar.gz.

File metadata

  • Download URL: kinopoiskpy-0.7.4.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for kinopoiskpy-0.7.4.tar.gz
Algorithm Hash digest
SHA256 30c02bf027c9ca4c5910a6b2fa8f4c11722f4b848eadaa343f5aa7aa17f66cdb
MD5 59bfcc8933f7c84e89d69db8e554bef3
BLAKE2b-256 6dcd9d2a52b38a47f278dddea69271d89891dc3182da3a5487b4a65acda94072

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page