I am trying to parse some tables from a wiki page e.g. http://en.wikipedia.org/wiki/List_of_Bollywood_films_of_2014. there are four tables with same class name "wikitable". When I write:
movieList= soup.find('table',{'class':'wikitable'})
rows = movieList.findAll('tr')
It works fine, but when I write:
movieList= soup.findAll('table',{'class':'wikitable'})
rows = movieList.findAll('tr')
It throws an error:
Traceback (most recent call last):
File "C:\Python27\movieList.py", line 24, in <module>
rows = movieList.findAll('tr')
AttributeError: 'ResultSet' object has no attribute 'findAll'
when I print movieList it prints all four table.
Also, how can I parse the content effectively because the no. of columns in a row is variable? I want to store this information into different variables.