Вот мой код:
import requests
from bs4 import BeautifulSoup, Comment
r = requests.get('https://pro.eslgaming.com/r6/proleague/standings/')
soup = BeautifulSoup(r.text, features="html.parser")
table = soup.find('table')
table_rows = table.find_all('tr')
for tr in table_rows:
td = tr.find_all('td')
row = [i.text for i in td]
print(row)
Я получаю вывод:
[]
['{{team.position}}.', '', '\n {{team.team.name}}\n DISQUALIFIED\n', '{{team.points}}', '{{team.matches_played}}', '{{team.matches_won}}', '-', '{{team.matches_draw}}', '-', '{{team.matches_lost}}', '{{team.rounds_won}}', ':', '{{team.rounds_lost}}', '{{team.rounds_won - team.rounds_lost}}']
Я помню, что делал html и помнил, что {{
и }}
заключают в себе переменная или некоторый код. Вместо распечатки {{team.points}}
можно было бы получить ее переменную, например 5
.