title: Extracting data from a table using Python Beautiful soup
body: <p>I'm trying to parse rows within a table (the departure board times) from the following:</p>
  
  <pre><code>buscms_widget_departureboard_ui_displayStop_Callback("
   &lt;div class='\"livetimes\"'&gt;
   &lt;table class='\"busexpress-clientwidgets-departures-departureboard\"'&gt;
    &lt;thead&gt;
     &lt;tr class='\"rowStopName\"'&gt;
      &lt;th colspan='\"3\"' data-bearing='\"SW\"' data-lat='\"51.7505683898926\"' data-lng='\"-1.225102186203\"' title='\"oxfajmwg\"'&gt;
       Divinity Road
      &lt;/th&gt;
      &lt;tr&gt;
       &lt;tr class='\"textHeader\"'&gt;
        &lt;th colspan='\"3\"'&gt;
         text 69325694 to 84637 for live times
        &lt;/th&gt;
        &lt;tr&gt;
         &lt;tr class='\"rowHeaders\"'&gt;
          &lt;th&gt;
           service
          &lt;/th&gt;
          &lt;th&gt;
           destination
          &lt;/th&gt;
          &lt;th&gt;
           time
          &lt;/th&gt;
          &lt;tr&gt;
          &lt;/tr&gt;
         &lt;/tr&gt;
        &lt;/tr&gt;
       &lt;/tr&gt;
      &lt;/tr&gt;
     &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
     &lt;tr class='\"rowServiceDeparture\"'&gt;
      &lt;td class='\"colServiceName\"'&gt;
       4A  (OBC)
      &lt;/td&gt;
      &lt;td class='\"colDestination\"' rise\"="" title='\"Elms'&gt;
       Elms Rise
      &lt;/td&gt;
      &lt;td 21:49:00\"="" class='\"colDepartureTime\"' data-departuretime='\"20/02/2017' mins\"="" title='\"5'&gt;
       5 mins
      &lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr class='\"rowServiceDeparture\"'&gt;
      &lt;td class='\"colServiceName\"'&gt;
       4A  (OBC)
      &lt;/td&gt;
      &lt;td class='\"colDestination\"' rise\"="" title='\"Elms'&gt;
       Elms Rise
      &lt;/td&gt;
      &lt;td 22:11:00\"="" class='\"colDepartureTime\"' data-departuretime='\"20/02/2017' mins\"="" title='\"27'&gt;
       27 mins
      &lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr class='\"rowServiceDeparture\"'&gt;
      &lt;td class='\"colServiceName\"'&gt;
       4  (OBC)
      &lt;/td&gt;
      &lt;td class='\"colDestination\"' title='\"Abingdon\"'&gt;
       Abingdon
      &lt;/td&gt;
      &lt;td 22:29:00\"="" class='\"colDepartureTime\"' data-departuretime='\"20/02/2017' title='\"22:29\"'&gt;
       22:29
      &lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr class='\"rowServiceDeparture\"'&gt;
      &lt;td class='\"colServiceName\"'&gt;
       4A  (OBC)
      &lt;/td&gt;
      &lt;td class='\"colDestination\"' rise\"="" title='\"Elms'&gt;
       Elms Rise
      &lt;/td&gt;
      &lt;td 22:49:00\"="" class='\"colDepartureTime\"' data-departuretime='\"20/02/2017' mins\"="" title='\"65'&gt;
       65 mins
      &lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr class='\"rowServiceDeparture\"'&gt;
      &lt;td class='\"colServiceName\"'&gt;
       4A  (OBC)
      &lt;/td&gt;
      &lt;td class='\"colDestination\"' rise\"="" title='\"Elms'&gt;
       Elms Rise
      &lt;/td&gt;
      &lt;td 23:09:00\"="" class='\"colDepartureTime\"' data-departuretime='\"20/02/2017' title='\"23:09\"'&gt;
       23:09
      &lt;/td&gt;
     &lt;/tr&gt;
    &lt;/tbody&gt;
   &lt;/table&gt;
  &lt;/div&gt;
  &lt;div class='\"scrollmessage_container\"'&gt;
   &lt;div class='\"scrollmessage\"'&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class='\"services\"'&gt;
   &lt;a class='\"service' href='\"#\"' onclick="\&amp;quot;serviceNameClick('');\&amp;quot;" selected\"=""&gt;
    all
   &lt;/a&gt;
   &lt;a class='\"service\"' href='\"#\"' onclick="\&amp;quot;serviceNameClick('4');\&amp;quot;"&gt;
    4
   &lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="dptime"&gt;
   &lt;span&gt;
    times generated at:
   &lt;/span&gt;
   &lt;span&gt;
    21:43
   &lt;/span&gt;
  &lt;/div&gt;
  ");
  </code></pre>
  
  <p>In particular, I'm trying to extract all the departure times - so I'd like to capture the minutes from departure - for example 12 minutes away.</p>
  
  <p>I have the following code:</p>
  
  <pre><code># import libraries
  import urllib.request
  from bs4 import BeautifulSoup
  
  # specify the url
  quote_page = 'http://www.buscms.com/api/REST/html/departureboard.aspx?callback=buscms_widget_departureboard_ui_displayStop_Callback&amp;clientid=Nimbus&amp;stopcode=69325694&amp;format=jsonp&amp;servicenamefilder=&amp;cachebust=123&amp;sourcetype=siri&amp;requestor=Netescape&amp;includeTimestamp=true&amp;_=1487625719723'
  
  # query the website and return the html to the variable 'page'
  page = urllib.request.urlopen(quote_page) 
  
  # parse the html using beautiful soap and store in variable `soup`
  soup = BeautifulSoup(page, 'html.parser')  
  
  print(soup.prettify())
  </code></pre>
  
  <p>I'm not sure how to find the minutes from departure from the above? Is it something like:</p>
  
  <pre><code>minutes_from_depart = soup.find("tbody", attrs={'td': 'mins'}) 
  </code></pre>