mirror of
https://github.com/doms9/iptv.git
synced 2026-04-21 19:46:59 +02:00
e
- misc edits.
This commit is contained in:
parent
edc80fba5f
commit
00000d9e8c
4 changed files with 15 additions and 9 deletions
|
|
@ -45,11 +45,11 @@ class Cache:
|
|||
if per_entry:
|
||||
return {k: v for k, v in data.items() if self.is_fresh(v)}
|
||||
|
||||
if index:
|
||||
ts: float | int = data[index].get("timestamp", Time.default_8())
|
||||
|
||||
else:
|
||||
ts: float | int = data.get("timestamp", Time.default_8())
|
||||
ts: float | int = (
|
||||
data[index].get("timestamp", Time.default_8())
|
||||
if index
|
||||
else data.get("timestamp", Time.default_8())
|
||||
)
|
||||
|
||||
dt_ts = Time.clean(Time.from_ts(ts)).timestamp()
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ class Leagues:
|
|||
pattern = re.compile(r"\s+(?:-|vs\.?|at|@)\s+", re.I)
|
||||
|
||||
if pattern.search(event):
|
||||
t1, t2 = re.split(pattern, event)
|
||||
t1, t2 = pattern.split(event)
|
||||
|
||||
return any(t in self.teams(league) for t in (t1.strip(), t2.strip()))
|
||||
|
||||
|
|
|
|||
|
|
@ -217,9 +217,14 @@ class Network:
|
|||
got_one: asyncio.Event,
|
||||
) -> None:
|
||||
|
||||
invalids = ["amazonaws", "knitcdn", "jwpltx"]
|
||||
|
||||
escaped = [re.escape(i) for i in invalids]
|
||||
escaped = [
|
||||
re.escape(i)
|
||||
for i in {
|
||||
"amazonaws",
|
||||
"knitcdn",
|
||||
"jwpltx",
|
||||
}
|
||||
]
|
||||
|
||||
pattern = re.compile(rf"^(?!.*({'|'.join(escaped)})).*\.m3u8", re.I)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue