Problem z pobieraniem danych z kodu HTML przy użyciu BeautifulSoup

0

Cześć, moim zadaniem jest pobranie danych z kodu źródłowego strony(https://www.vitisport.cz/index.php?clanek=quicktips&sekce=fotbal&lang=pl), z użyciem BeautifulSoup a następnie wypisanie listy wszystkich meczy. Niestety cały czas konsola zwraca AttributeError:

Traceback (most recent call last):
  File "C:/Users/jakub/PycharmProjects/proj2/main.py", line 9, in <module>
    rows = table.find('td').find_all('tbody')
AttributeError: 'NoneType' object has no attribute 'find'

Mój kod:
main.py

import urllib.request
from bs4 import BeautifulSoup
from match import Match

matches= []
source = urllib.request.urlopen("https://www.vitisport.cz/index.php?clanek=quicktips&sekce=fotbal&lang=pl").read()
soup = BeautifulSoup(source, 'html.parser')
table = soup.find_all("table", {"class": "tabulkaquick"})[0].find('table')
rows = table.find('td').find_all('tbody')
for row in rows:
    cols = row.find_all("td")
    matches.append(Match(cols[0].datetime,cols[1].text,cols[2].text,cols[3].int,cols[4].text,cols[5].text,cols[6].text))
with open('matches_list.txt','w') as f:
    for match in matches:
        print(match)
        f.write(f"{match.date},{match.host},{match.guest},{match.goals1st},{match.goals2nd},{match.matchtype},({match.index})\n")

match.py

from datetime import datetime

class Match:
    def __init__(self, date, host, guest, goals1st, goals2nd, matchtype, index):
        self.date = datetime.strptime(date, '%d.%m.%Y')
        self.host = host(str)
        self.guest = guest(str)
        self.goals1st = goals1st(int)
        self.goals2nd = goals2nd(int)
        self.matchtype = matchtype(str)
        self.index = index(float)

    def __repr__(self):
        return self.date
        return self.host
        return self.guest
        return self.goals1st
        return self.goals2nd
        return self.matchtype
        return self.index

Czy mógłbym prosić o wyjaśnienie gdzie zrobiłem błąd i dlaczego tak się dzieje? : )

2
>>> for row in soup.find("table", {"class": "tabulkaquick"}).find_all('tr'):
...     print(row.text)
... 


FAQ INDEX


TOP TIPS IN 7 DAYS

VITISPORT TIP
INDEX


score
1
0
2
tip

   EURO 2021
22.06AngliaCzechy2 : 148 %28 %25 %11.8
22.06SzkocjaChorwacja1 : 132 %33 %35 %02-0.2
 Brazylia  Serie A
22.06Atlético MineiroChapecoense3 : 078 %15 %7 %15.5
 Gruzja  Crystalbet Erovnuli Liga
22.06Torpedo KutaisiDinamo Batumi0 : 219 %23 %58 %2-3.1
22.06Dila GoriShuqura Kobuleti1 : 141 %31 %28 %101.0
 Finlandia  Ykkönen
22.06VPS VaasaRoPS Rovaniemi2 : 154 %25 %21 %12.6
22.06FC TPS TurkuEkenäs IF1 : 132 %33 %35 %02-0.3
 Kazachstan  Premier Liga
# ...

1 użytkowników online, w tym zalogowanych: 0, gości: 1