import requests
from bs4 import BeautifulSoup
r = requests.get('https://www.worldometers.info/coronavirus/')
c = r.content
soup = BeautifulSoup (c, 'html.parser')
indexs = 0
table1 = soup.find("table")
table2 = table1.find('tbody')
table3 = table2.find_all('td')
for index,i in enumerate(table3):
print(f'{index} - {table3[indexs].text} - Total Cased - {table3[indexs+1].text}')
indexs+=9
Привет, ребята, у меня есть проблема, этот код делает его работу Потрясающе выводить то, что он должен, но в конце, когда он выводит последний, говорящий об ошибке вроде этого
Exception has occurred: IndexError
list index out of range
File "C:\Users\SGamr\Desktop\Python\worldmetters.py", line 14, in <module>
print(f'{index} - {table3[indexs].text} - Total Cased - {table3[indexs+1].text}')
помогите мне, спасибо < 3