title: Webscraping Table with Python
body: <p>So at the moment I am trying to webscrape the following race table from the following:
  <a href="https://cris.rwwa.com.au/racefield.aspx?meeting=5159089&amp;race=1" rel="nofollow noreferrer">https://cris.rwwa.com.au/racefield.aspx?meeting=5159089&amp;race=1</a></p>
  <p>My code at the moment:</p>
  <pre><code>from tabulate import tabulate
  from bs4 import BeautifulSoup
  import csv
  
  url = 'https://cris.rwwa.com.au/racefield.aspx?meeting=5159089&amp;race=1'
  r = requests.get(url)
  soup = BeautifulSoup(r.text, 'html.parser')
  raceTable = soup.find('table', class_ = 'tblcris raceField')
  
  for racer in raceTable.find_all('table')[1]:
      rows = racer.find_all('tr')
      for row in rows:
          try:
              rowdata = row.findAll('td')
              horseNumber.append(rowdata[1].text)
              horseName.append(rowdata[2].text)
              riderName.append(rowdata[8].text)
              trainerName.append(rowdata[9].text)
              print(horseNumber, horseName, riderName, trainerName)
          except:
              print(&quot;field is Null&quot;)
  </code></pre>
  <p>when ran I get the following Error:</p>
  <pre><code>
  Traceback (most recent call last):
    File &quot;G:\Adv Python\wk2\webScraping.py&quot;, line 11, in &lt;module&gt;
      for racer in raceTable.find_all('table')[1]:
  IndexError: list index out of range
  
  </code></pre>
  <p>From this I am not entirely sure what is going wrong as I am fairly new to webscraping, so any help would be appreciated.</p>