The table
variable contains a list. You would need to call find_all
on its members (even though you know it’s a list with only one member), not on the entire thing.
>>> type(table)
<class 'bs4.element.ResultSet'>
>>> type(table[0])
<class 'bs4.element.Tag'>
>>> len(table[0].find_all('tr'))
6
>>>