def cargardatos(catalog):
    vfile = cf.data_dir + 'videos/videos-50pct.csv'
    input_file = csv.DictReader(open(vfile, encoding='utf-8'))
    for video in input_file:
        tags = video["tags"].split("|")
        video["tags"] = tags
        model.addvideo(catalog, video)
def loadvideos(catalog):

    #Carga los libros del archivo.  Por cada video se toman sus autores y por
    #cada uno de ellos, se crea en la lista de autores, a dicho autor y una
    #referencia al libro que se esta procesando.

    booksfile = cf.data_dir + 'videos-small.csv'
    input_file = csv.DictReader(open(booksfile, encoding='utf-8'))
    for book in input_file:
        model.addvideo(catalog, book)
Example #3
0
def loadVideos(catalog):
    videosfile = cf.data_dir + 'videos/videos-large.csv'
    input_file = csv.DictReader(open(videosfile, encoding='utf-8'))
    for video in input_file:
        model.addvideo(catalog, video) 
def cargardatos(catalog):
    vfile = cf.data_dir + 'videos/videos-small.csv'
    input_file = csv.DictReader(open(vfile, encoding='utf-8'))
    for video in input_file:
        model.addvideo(catalog, video)