阿皮兰布勒卡萨

rambler-kassa的Python项目详细描述


安装

只需运行:

pip install rambler-kassa

或者通过git clone下载项目并运行以下命令:

pip install -r requirements.txt

用法

创建实例

fromrambler_kassa.rambler_kassaimport*city_id=1# Identifier of the city where the films will be searching in the cinemakassa=RamblerKassa('<api_key>',city_id)

获取电影

foriteminkassa.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# -> ...

按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

获取电影时间表

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'

按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'

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
将Java小程序转换为应用程序   音频数据格式和文件格式Java声音   java如何使用jsoup维护变量cookie和会话?   您能否使用类似于Java中python关键字args的概念来最小化访问器方法的数量?   JavaSpring引导HTTPS和重定向   如何反转直角三角形(Java)   JavaPowerMockito:拦截所有静态方法   java Vaadin TouchKit基本主题问题   java如何指定文件的路径。要在其文件系统中动态加载的类文件?   java Google Play Services Unity   java MyBatis SQL Builder类,如%   java无法访问Internet Explorer中的小程序   java如何计算2d数组中的行之间的差异?   在GridBagLayout中调用SetContraints时发生java NullPointerException   java同步锁和独立线程:Android   泛型我能让这个java pulk()方法更安全吗?   java为火车线上的所有车站创建距离地图   java在素数阶循环群中查找元素   java正在查找什么类型的类