mirror of
https://github.com/doms9/iptv.git
synced 2026-01-21 03:59:03 +01:00
e
fix watchfooty scraping
This commit is contained in:
parent
b4f5824bb5
commit
00000d91c7
2 changed files with 28 additions and 13 deletions
|
|
@ -67,6 +67,14 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
|||
if not (rank_elem := li_item.css_first(".f1-podium--rank")):
|
||||
continue
|
||||
|
||||
if not (time_elem := li_item.css_first(".SaatZamanBilgisi")):
|
||||
continue
|
||||
|
||||
time_text = time_elem.text(strip=True)
|
||||
|
||||
if not pattern.search(time_text):
|
||||
continue
|
||||
|
||||
sport = rank_elem.text(strip=True)
|
||||
|
||||
if not (driver_elem := li_item.css_first(".f1-podium--driver")):
|
||||
|
|
@ -83,14 +91,6 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
|||
if not (href := link.attributes.get("href")):
|
||||
continue
|
||||
|
||||
if not (time_elem := li_item.css_first(".SaatZamanBilgisi")):
|
||||
continue
|
||||
|
||||
time_text = time_elem.text(strip=True)
|
||||
|
||||
if not pattern.search(time_text):
|
||||
continue
|
||||
|
||||
events.append(
|
||||
{
|
||||
"sport": sport,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue