title: Web Scraping Rap lyrics on Rap Genius w/ Python
body: <p>I am somewhat of a coding novice, and I have been trying to scrape Andre 3000's lyrics off Rap genius, <a href="http://genius.com/artists/Andre-3000" rel="nofollow noreferrer">http://genius.com/artists/Andre-3000</a>, by using Beautiful Soup (A Python library for pulling data out of HTML and XML files). My end goal is to have the data in a string format. Here is what I have so far:</p>
  
  <pre><code>from bs4 import BeautifulSoup
  from urllib2 import urlopen
  
  artist_url = "http://rapgenius.com/artists/Andre-3000"
  
  def get_song_links(url):
      html = urlopen(url).read()
      # print html 
      soup = BeautifulSoup(html, "lxml")
      container = soup.find("div", "container")
      song_links = [BASE_URL + dd.a["href"] for dd in container.findAll("dd")]
  
      print song_links
  
  get_song_links(artist_url)
  for link in soup.find_all('a'):
      print(link.get('href'))
  </code></pre>
  
  <p>So I need help with the rest of the code. How do I get his lyrics into string format? and then  how do I use the Natural Language Toolkit (NLTK) to token the sentences and words.</p>