title: How to select html tr elements with a specific td class
body: <p>I am using selenium to scrape a website, the website has a calendar and i want to get the days out of that calendar that have available times. I have inspected the calendar and found these elements</p>
  <pre><code>&lt;table class=&quot;ui-datepicker-calendar&quot;&gt;
     &lt;thead&gt;
        &lt;tr&gt;
           &lt;th scope=&quot;col&quot;&gt;&lt;span title=&quot;Monday&quot;&gt;Mån&lt;/span&gt;&lt;/th&gt;
           &lt;th scope=&quot;col&quot;&gt;&lt;span title=&quot;Tuesday&quot;&gt;Tis&lt;/span&gt;&lt;/th&gt;
           &lt;th scope=&quot;col&quot;&gt;&lt;span title=&quot;Wednesday&quot;&gt;Ons&lt;/span&gt;&lt;/th&gt;
           &lt;th scope=&quot;col&quot;&gt;&lt;span title=&quot;Thursday&quot;&gt;Tor&lt;/span&gt;&lt;/th&gt;
           &lt;th scope=&quot;col&quot;&gt;&lt;span title=&quot;Friday&quot;&gt;Fre&lt;/span&gt;&lt;/th&gt;
           &lt;th scope=&quot;col&quot; class=&quot;ui-datepicker-week-end&quot;&gt;&lt;span title=&quot;Saturday&quot;&gt;Lör&lt;/span&gt;&lt;/th&gt;
           &lt;th scope=&quot;col&quot; class=&quot;ui-datepicker-week-end&quot;&gt;&lt;span title=&quot;Sunday&quot;&gt;Sön&lt;/span&gt;&lt;/th&gt;
        &lt;/tr&gt;
     &lt;/thead&gt;
     &lt;tbody&gt;
        &lt;tr&gt;
           &lt;td class=&quot; ui-datepicker-other-month ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;29&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-other-month ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;30&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-other-month ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;31&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;1&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;2&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-week-end ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;3&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-week-end ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;4&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
           &lt;td class=&quot; ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;5&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;6&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;7&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;8&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;9&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-week-end ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;10&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-week-end ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;11&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
           &lt;td class=&quot; unavailable ui-datepicker-today&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default ui-state-highlight&quot; href=&quot;#&quot;&gt;12&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; available&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;13&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; available&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;14&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;15&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;16&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-week-end unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;17&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-week-end unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;18&lt;/a&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;19&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;20&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;21&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;22&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;23&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-week-end unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;24&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-week-end unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;25&lt;/a&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;26&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;27&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;28&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;29&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; unavailable&quot; data-handler=&quot;selectDay&quot; data-event=&quot;click&quot; data-month=&quot;8&quot; data-year=&quot;2022&quot;&gt;&lt;a class=&quot;ui-state-default&quot; href=&quot;#&quot;&gt;30&lt;/a&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-week-end ui-datepicker-other-month ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;1&lt;/span&gt;&lt;/td&gt;
           &lt;td class=&quot; ui-datepicker-week-end ui-datepicker-other-month ui-datepicker-unselectable ui-state-disabled unavailable&quot;&gt;&lt;span class=&quot;ui-state-default&quot;&gt;2&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
     &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  <p>as you can see the days that have times available have td class= &quot; available&quot; those are the days I want to save and keep in a list.</p>
  <p>I have managed to get the day number printed out so I seem to have all the rows saved as elements since when I do</p>
  <pre class="lang-py prettyprint-override"><code>avail = driver.find_elements(By.CLASS_NAME,&quot;ui-datepicker-calendar&quot;)
  
  for elem in avail:
      print(elem.text)
  
  </code></pre>
  <p>the output I get is 29,30,31,1,2,3,4...</p>
  <p>How do I only save the rows that have td class= &quot; available&quot;?</p>