title: Beautiful Soup - making a list
body: <p>I've been at it for several days in the soup trying to scrape a simple html structure into a list to make a dataframe.  If it was html tables i have no problem.  I am working with a structure like:</p>
  <pre><code>   &lt;div class=&quot;someTypeofRow&quot;&gt;
         &lt;a href=&quot;/mainpage/choc.html&quot;&gt;
          Chocolate flavor
         &lt;/a&gt;
         &lt;span class=&quot;yearText&quot;&gt;
          (2009)
         &lt;/span&gt;
         &lt;br/&gt;
         &lt;a href=&quot;/mainpage/van.html&quot;&gt;
          Vanilla flavor
         &lt;/a&gt;
         &lt;span class=&quot;yearText&quot;&gt;
          (2004)
         &lt;/span&gt;
         &lt;br/&gt;
  </code></pre>
  <p>And I hope to make a list out of it such that could be put into a dataframe</p>
  <pre><code>list = [ ('/mainpage/choc.html', 'Chocolate flavor', '2009') ,
               ('/mainpage/van.html', 'Vanilla flavor', '2004' )]
  </code></pre>
  <p>I am able to get href so far:</p>
  <pre><code>firstlist = []
  jims = soup.find(class_='someOtherRow')
  for jim in jims.find_all('a', href=True): 
      if jim.text: 
          firstlist.append(jim['href'])
  print(firstlist)
  </code></pre>
  <p>I am able to get the text stuff separately:</p>
  <pre><code>car_elems = soup.find(class_='someOtherRow')
  d1 = car_elems.find_all_next(string=True)
  for car_elem in car_elems:
      print (d1)
  </code></pre>
  <p>but i can't seem to put it all together or iterate correctly.  thank you for any suggestions.</p>