本文整理汇总了Python中movie.Movie.update_invalid_movies方法的典型用法代码示例。如果您正苦于以下问题:Python Movie.update_invalid_movies方法的具体用法?Python Movie.update_invalid_movies怎么用?Python Movie.update_invalid_movies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类movie.Movie
的用法示例。
在下文中一共展示了Movie.update_invalid_movies方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Config
# 需要导入模块: from movie import Movie [as 别名]
# 或者: from movie.Movie import update_invalid_movies [as 别名]
#!/usr/bin/python
import smtplib
from config import Config
from email.mime.text import MIMEText
from movie import Movie
config = Config()
movie = Movie()
current_genres = movie.current_genres()
current_certificates = movie.current_certificates()
movie.update_rating()
movie.update_invalid_movies()
try:
imdb_ids = []
invalid_movies = movie.find_invalid_movies()
movies_missing_images = movie.find_missing_images()
new_genres = list(set(movie.current_genres()) - set(current_genres))
new_certificates = list(set(movie.current_certificates()) -
set(current_certificates))
if (config.email_address and
(invalid_movies or movies_missing_images or
new_genres or new_certificates)):
body = ""
if invalid_movies:
body = "Movies with Incomplete Data(%d):\n" % (len(invalid_movies))
for invalid_movie in invalid_movies: