def main(args):
  global verbose
  verbose = args.verbose

  artist_list = getSimilarArtist(args.artist)
  artist_list = [args.artist,] + artist_list

  print("artist\ttitle\ttext")
  for artist in artist_list[:args.n_artists]:
    urls = getLyricUrlList(artist)
    if verbose:
      logger.info('{}: {} songs'.format(artist, len(urls)))
    for i, url in enumerate(urls, start=1):
      if verbose:
        if i%10 == 0: logger.info("Wrote " + str(i) + " songs")
      lyric = getLyricText(url[1])
      print("{artist}\t{title}\t{text}".format(
        artist=artist,
        title=url[0].encode("utf-8"),
        text=lyric))
      time.sleep(1.0)  # Wait one second