For my class we were tasked with scaping raw data and processing it. I want to scrape data from UFC fights from http://statleaders.ufc.com/en/career.
For example in class we used a different website that had weather data information and we used the line
table = bs.find_all("table")
however, for the ufc site that doesn't work so I looked at the source page and it seems like the class is called "results-table" so tried doing
raw_data = []
Find all the tables in the webpage page that we have just parsed
table= bs.find_all("div", {"class": "results-table"})
for row in table: line = row.text raw_data.append(line)
print(raw_data)
but my raw data is empty. How do I scrape this data correctly?
The example you provided works, but I think you didn't get the data correctly, here's an example of how I did it: