mirror of
https://github.com/doms9/iptv.git
synced 2026-01-21 03:59:03 +01:00
e
This commit is contained in:
parent
8ac6ca8360
commit
00000d94e3
2 changed files with 4 additions and 4 deletions
|
|
@ -57,7 +57,7 @@ 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|\d+\s+(minutes?)\b)", re.IGNORECASE)
|
||||
pattern = re.compile(r"^(?:LIVE|(?:[1-9]|[12]\d|30)\s+minutes?\b)", re.IGNORECASE)
|
||||
|
||||
soup = HTMLParser(html_data.content)
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,8 @@ async def process_event(
|
|||
context: BrowserContext,
|
||||
) -> str | None:
|
||||
|
||||
pattern = re.compile(r"\((\d+)\)")
|
||||
|
||||
page = await context.new_page()
|
||||
|
||||
captured: list[str] = []
|
||||
|
|
@ -111,9 +113,7 @@ async def process_event(
|
|||
|
||||
return
|
||||
|
||||
match = re.search(r"\((\d+)\)", text)
|
||||
|
||||
if not match or int(match[1]) == 0:
|
||||
if not (match := pattern.search(text)) or int(match[1]) == 0:
|
||||
log.warning(f"URL {url_num}) No available stream links.")
|
||||
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue