Example #1
0
def large_build():
    BANDS = concert_query.sql_artists_null()
    print '%s artists to be tagged' % len(BANDS)
    
    con = lite.connect('concertclash.db')

    with con:
        cur = con.cursor()
        
        #for artist in BANDS:
            #print artist[0]
    
        #cur.execute("UPDATE artists SET genres=? WHERE artist=?", (genre, artist[0]))        
        for artist in BANDS:
            artist = artist[0]
            genres = lastFM_artist_genre(artist)
            cur.execute("UPDATE artists SET genres=? WHERE artist=?", (genres,artist))
            print artist, genres
        con.commit()
Example #2
0
    #genreList = [(unicode(genre.text), int(count.text)) for (genre, count) in genre_count]

    # returns genreList to addGenres function


def large_build():
    BANDS = concert_query.sql_artists_null()
    print '%s artists to be tagged' % len(BANDS)
    
    con = lite.connect('concertclash.db')

    with con:
        cur = con.cursor()
        
        #for artist in BANDS:
            #print artist[0]
    
        #cur.execute("UPDATE artists SET genres=? WHERE artist=?", (genre, artist[0]))        
        for artist in BANDS:
            artist = artist[0]
            genres = lastFM_artist_genre(artist)
            cur.execute("UPDATE artists SET genres=? WHERE artist=?", (genres,artist))
            print artist, genres
        con.commit()

#print large_build()
concert_query.sql_artists_meta()
print concert_query.sql_artists_null()