Exemple #1
0
def get_plot_for_null(null_list):
  imdb_list = []
  for l in null_list:
    plot_str = ''
    id = l[0]
    print id
    movie = IMDb().get_movie(id)
    plot = movie.get('plot')
    if plot:
      for p in plot: plot_str += p
      plot_str = plot_str.replace("\'", "")
      plot_str = plot_str.replace("\"", "")
      print plot_str
      insert_role(plot_str,id)
Exemple #2
0
def get_plot_for_null(null_list):
    imdb_list = []
    for l in null_list:
        plot_str = ''
        id = l[0]
        print id
        movie = IMDb().get_movie(id)
        plot = movie.get('plot')
        if plot:
            for p in plot:
                plot_str += p
            plot_str = plot_str.replace("\'", "")
            plot_str = plot_str.replace("\"", "")
            print plot_str
            insert_role(plot_str, id)
Exemple #3
0
def plot_list():
    train = db_util.get_movie_list()
    test = db_util.get_test_movie_list()
    mv_list = db_util.non_common(test, train)
    # mv_list = db_util.get_movie_list()
    record_list = []
    i = 0
    record_list.append(['movieid', 'imdbid', 'plot'])
    for m in mv_list:
        # plot_str = ''
        imdbid = db_util.get_imdb_id(m)
        movie = IMDb().get_movie(imdbid)
        plot = movie.get('plot')
        # for p in plot: plot_str += p
        print[m, imdbid, plot]
        record_list.append([m, imdbid, plot])
    return record_list
Exemple #4
0
def plot_list():
  train = db_util.get_movie_list()
  test = db_util.get_test_movie_list()
  mv_list = db_util.non_common(test,train)
  # mv_list = db_util.get_movie_list()
  record_list = []
  i = 0
  record_list.append(['movieid','imdbid','plot'])
  for m in mv_list:
    # plot_str = ''
    imdbid = db_util.get_imdb_id(m)
    movie = IMDb().get_movie(imdbid)
    plot = movie.get('plot')
    # for p in plot: plot_str += p
    print [m,imdbid,plot]
    record_list.append([m,imdbid,plot])
  return record_list
Exemple #5
0
def get_mv_plot(mvid):
    imdbid = db_util.get_imdb_id(mvid)
    movie = IMDb().get_movie(id)
    plot = movie.get('plot')
    return plot
Exemple #6
0
def get_mv_plot(mvid):
  imdbid = db_util.get_imdb_id(mvid)
  movie = IMDb().get_movie(id)
  plot = movie.get('plot')
  return plot