title: How to capture table in a structured format from this website using Beautiful soup and Pandas?
body: <p>I want to scrape the table from this website &quot;&quot; and as it keeps getting updated hourly want to track changes as well. I tried scraping data using selenium but it was all in one column without any table. How to use pandas and Beautiful Soup to scrape the table in a structured format and track changes as well. This is the code I'm trying to figure out.</p>
  <pre><code>import pandas as pd
  from bs4 import BeautifulSoup
  soup = BeautifulSoup(html, &quot;html.parser&quot;)
  table = soup.find('table', attrs={'id':'subs noBorders evenRows'})
  table_rows = table.find_all('tr')
  
  res = []
  for tr in table_rows:
      td = tr.find_all('td')
      row = [tr.text.strip() for tr in td if tr.text.strip()]
      if row:
          res.append(row)
  
  
  df = pd.DataFrame(res, columns=[&quot;Notice No&quot;,&quot;Subject&quot;,&quot;Segment Name&quot;,&quot;Category Name&quot;,&quot;Department&quot;,&quot;PDF&quot;])
  print(df)
  </code></pre>
  <p>It would be a help if you can help me getting data and how to keep track of new data whenever I run the script again.</p>