阿皮兰布勒卡萨

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第三方库


热门话题
与ReentrantLock相比,java ReentrantReadWriteLock的性能非常差   java如何使用Maven Android Studio正确导入?   安卓将ADB添加到我的Java PC应用程序   反射Java getDeclaredConstructor失败,来自JUnit的NoSuchMethodException   JSP上siteedit标记库的java替代   JavaSpring环境概要文件和JPA   java中是否有一个类似于StringBuilder的类,唯一的区别是它具有固定的长度?   JavaMathContext。小数点32 vs MathContext。小数点64,使用哪一个,为什么?   java使用spring在Ibm Websphere MQ中实现重试逻辑   java调用SpriteBatch。开始()和结束()   java有一种从文本中读取文本的方法。文件,并将其设置为pom中的maven属性。xml专家?   java让sitemesh使用struts2   Java Swing:在现有窗口上定位对话框   使用带有MemSql的JPA本机查询的java Select json列