本文整理匯總了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: