I'm trying to pull data from specific columns in the 4th and 5th table from this website https://hollowknight.fandom.com/wiki/Damage_Values_and_Enemy_Health_(Hollow_Knight)
Here's my code
import bs4
import requests
url = "https://hollowknight.fandom.com/wiki/Damage_Values_and_Enemy_Health_(Hollow_Knight)"
req = requests.get(url)
soup = bs4.BeautifulSoup(req.text, "html.parser")
names = []
number = []
for row in rows[1:]:
names.append(row.find_all('td')[0])
number.append(row.find_all('td')[1])
for first, second in zip(names, number):
print(first.text, second.text)
For some reason it can't see the 4th or 5th table. However, if I replace the 3 in
table = soup.find_all('table')[3]
with a 2 or lower it sees it just fine. Can anyone help me understand why it can't see the last 2 tables in the website?