mirror of
https://github.com/doms9/iptv.git
synced 2026-04-21 19:46:59 +02:00
e
This commit is contained in:
parent
75cc3e4bb5
commit
00000d917d
1 changed files with 21 additions and 23 deletions
|
|
@ -64,16 +64,16 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
|||
|
||||
soup = HTMLParser(html_data.content)
|
||||
|
||||
for card in soup.css(".section-title"):
|
||||
sport = fix_league(card.text(strip=True))
|
||||
sport = None
|
||||
|
||||
node = card.next
|
||||
for node in soup.css(".wrapper *"):
|
||||
if (cls := node.attributes.get("class")) == "section-title":
|
||||
sport = fix_league(node.text(strip=True))
|
||||
|
||||
while node:
|
||||
if node.attributes.get("class") == "section-title":
|
||||
break
|
||||
if node.tag == "a" and cls == "match":
|
||||
if not sport:
|
||||
continue
|
||||
|
||||
elif node.tag == "a" and node.attributes.get("class") == "match":
|
||||
if not (team_elems := node.css(".team")):
|
||||
continue
|
||||
|
||||
|
|
@ -93,8 +93,6 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
|||
}
|
||||
)
|
||||
|
||||
node = node.next
|
||||
|
||||
return events
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue