mirror of
https://github.com/doms9/iptv.git
synced 2026-03-11 11:57:38 +01:00
e
- change scrape window for istreameast.py - harden scraping method for roxie.py - catch nulls for ppv.py - change scraping method for totalsportek.py - misc edits.
This commit is contained in:
parent
0fe9c5b1dd
commit
00000d940c
7 changed files with 141 additions and 87 deletions
|
|
@ -58,8 +58,6 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
|||
if not (html_data := await network.request(BASE_URL, log=log)):
|
||||
return events
|
||||
|
||||
pattern = re.compile(r"^(?:LIVE|(?:[1-9]|[12]\d|30)\s+minutes?\b)", re.I)
|
||||
|
||||
soup = HTMLParser(html_data.content)
|
||||
|
||||
for link in soup.css("li.f1-podium--item > a.f1-podium--link"):
|
||||
|
|
@ -71,9 +69,7 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
|||
if not (time_elem := li_item.css_first(".SaatZamanBilgisi")):
|
||||
continue
|
||||
|
||||
time_text = time_elem.text(strip=True)
|
||||
|
||||
if not pattern.search(time_text):
|
||||
if time_elem.text(strip=True).lower() != "live":
|
||||
continue
|
||||
|
||||
sport = rank_elem.text(strip=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue