本文整理汇总了Python中movie.Movie.getInfo方法的典型用法代码示例。如果您正苦于以下问题:Python Movie.getInfo方法的具体用法?Python Movie.getInfo怎么用?Python Movie.getInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类movie.Movie
的用法示例。
在下文中一共展示了Movie.getInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Red
# 需要导入模块: from movie import Movie [as 别名]
# 或者: from movie.Movie import getInfo [as 别名]
m.dumpImg()
r = Red(0)
for i in m.arr:
#如果存在记录,则更新评论人数和评级
if(session.query(MovieDB).filter_by(title=i['title']).first() is not None):
d = m.updateInfo(i['info'])
try:
s = session.query(MovieDB).filter_by(title=i['title']).first()
s.average=d['average']
s.votes=d['votes']
session.add(s)
session.commit()
except Exception:
continue
else:
d = m.getInfo(i['info'],i['title'])
s = MovieDB(title = i['title'],
director = d['director'],
writer = d['writer'],
actor = d['actor'],
types = d['types'],
country = d['country'],
lang = d['lang'],
ontime = d['ontime'],
runtime = d['runtime'],
another = d['another'],
summary = d['summary'],
average = d['average'],
votes = d['votes']
)
session.add(s)