API Rambler Kassa
Project description
install
Simply run:
pip install rambler-kassa
or download the project via git clone and run the following:
pip install -r requirements.txt
usages
Create instance
from rambler_kassa.rambler_kassa import *
city_id = 1 # Identifier of the city where the films will be searching in the cinema
kassa = RamblerKassa('<api_key>', city_id)
Get movies
for item in kassa.get_movies(98847):
print(item)
# -> Movie OriginalName='Take That: Greatest Hits Live' Genre=['Музыкальный'] Country=['Великобритания'] ViewCountDaily=0 AgeRestriction='16' Thumbnail='https://kassa.rambler.ru/s/StaticContent/P/Aimg/1905/23/190523100556922.jpg?1…' Cast=[] Description='29 июня Невафильм Emotion выпустит в кинотеатрах страны концерт «Take That: G…' Director='' CreatorName=None CreatorObjectID=None Year='2019' Duration='150 мин.' HorizonalThumbnail='https://kassa.rambler.ru/s/StaticContent/P/Aimg/1905/23/190523100557089.jpg' IsNonStop=False SubCreationIDs=[] Rating='7.00' Trailers=None Frames=None ReleaseDate=datetime.date(2019, 6, 29) KinoplanID=13477 ObjectID=98725 ClassType='Movie' Name='Take That: Greatest Hits Live' AfishaClassID=16 AfishaObjectID=257101
# -> Movie OriginalName='' Genre=['Документальный', ' Музыкальный'] Country=['Великобритания'] ViewCountDaily=1 AgeRestriction='16' Thumbnail='https://kassa.rambler.ru/s/StaticContent/P/Aimg/1906/14/190614141030583.jpg?1…' Cast=[] Description='«The Cure – Anniversary 1978-2018 Live in Hyde Park London», снятый режиссеро…' Director='Тим Поуп' CreatorName=None CreatorObjectID=None Year='2019' Duration='137 мин.' HorizonalThumbnail='https://kassa.rambler.ru/s/StaticContent/P/Aimg/1906/18/190618155201329.jpg' IsNonStop=False SubCreationIDs=[] Rating='7.00' Trailers=None Frames=None ReleaseDate=datetime.date(2019, 7, 11) KinoplanID=13605 ObjectID=98847 ClassType='Movie' Name='The Cure – Anniversary 1978-2018 Live in Hyde Park London' AfishaClassID=16 AfishaObjectID=25721
# -> ...
Get movie by id
movie = kassa.get_movie(98847)
print(movie)
# -> Movie OriginalName='' Genre=['Документальный', ' Музыкальный'] Country=['Великобритания'] ViewCountDaily=1 AgeRestriction='16' Thumbnail='https://kassa.rambler.ru/s/StaticContent/P/Aimg/1906/14/190614141030583.jpg?1…' Cast=[] Description='«The Cure – Anniversary 1978-2018 Live in Hyde Park London», снятый режиссеро…' Director='Тим Поуп' CreatorName=None CreatorObjectID=None Year='2019' Duration='137 мин.' HorizonalThumbnail='https://kassa.rambler.ru/s/StaticContent/P/Aimg/1906/18/190618155201329.jpg' IsNonStop=False SubCreationIDs=[] Rating='7.00' Trailers=None Frames=None ReleaseDate=datetime.date(2019, 7, 11) KinoplanID=13605 ObjectID=98847 ClassType='Movie' Name='The Cure – Anniversary 1978-2018 Live in Hyde Park London' AfishaClassID=16 AfishaObjectID=257212
Get schedules of movies
schedule = kassa.get_movies_schedules()
print(schedule[0])
# -> Schedule SessionID=46215468 CityID=2565 CreationClassType='Movie' CreationObjectID=97646 PlaceClassType='Place' PlaceObjectID=14232 DateTime=datetime.datetime(2019, 6, 20, 0, 0) Format='3D' IsSaleAvailable=True IsReservationAvailable=False IsWithoutSeats=False MinPrice='190' MaxPrice='190' HallID='9:13' HallName='Зал № 1' FeeType='Percent' FeeValue='0,0'
Get schedule movie by id
schedule = kassa.get_movie_schedules(98847)
print(schedule[0])
# -> Schedule SessionID=46425075 CityID=2565 CreationClassType='Movie' CreationObjectID=98847 PlaceClassType='Place' PlaceObjectID=5385 DateTime=datetime.datetime(2019, 7, 11, 19, 30) Format='' IsSaleAvailable=True IsReservationAvailable=False IsWithoutSeats=False MinPrice='500' MaxPrice='500' HallID='302:292' HallName='03' FeeType='Percent' FeeValue='0,0'
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
rambler-kassa-0.0.5.tar.gz
(4.4 kB
view details)
File details
Details for the file rambler-kassa-0.0.5.tar.gz
.
File metadata
- Download URL: rambler-kassa-0.0.5.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.19.1 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab4719ddd5ed407a88ef8ea7f0b2d5243b6dc37dfbe405446a9eed425c774664 |
|
MD5 | 2f1ef5c2950b7d7469796dce2873a994 |
|
BLAKE2b-256 | cb9841bf146574a8e55f71192942bf2cc05a4703e22696b8dc34f35d52358799 |