title: Python and beautifulsoup - Scrape Text
body: <pre><code>import requests
  from bs4 import BeautifulSoup
  
  url = 'https://www.brightscope.com/401k-rating/240370/Abengoa-Bioenergy-Company-Llc/244317/Abengoa-Bioenergy-Us-401K-Savings-Plan/'
  thepage = requests.get(url)
  urlsoup = BeautifulSoup(thepage.text, "html.parser")
  
  plandata = urlsoup.find(class_="plans-section").text
  
  print(plandata)
  </code></pre>
  
  <p>I;m trying to scrape only the class of rating number but when I use this code, I get nothing back :(. </p>
  
  <ol>
  <li>How do I scrape only the class of rating number? </li>
  <li>How could I scrape multiple classes (this is the most important part) and put them into a list thats readable?</li>
  </ol>
  
  <p>My thought would be to loop each page scraped and append them to a .csv file with a new line. </p>
  
  <p>Example below;  </p>
  
  <pre><code>Rating #1, Company Name1, etc, etc, etc
  
  Rating #2, Company Name2, etc, etc, etc
  </code></pre>
  
  <p>I just can't get over the hump of figuring this out. Thank for any help!</p>
  
  <p>Edit - The class "plans-section" holds the data that I want but it seems to be broken down to two div tags under it. I want to scrape the data in the class "data-text above-average". The problem is that each page seems to only have the same "data-text" and what comes after changes on each section/page. What options are there for me?  </p>