e
This commit is contained in:
parent
bbda8864e5
commit
00000d93c6
3 changed files with 11 additions and 6 deletions
|
|
@ -42,7 +42,7 @@ def main() -> None:
|
||||||
|
|
||||||
base_m3u8, chnl_number = vanilla_fetch()
|
base_m3u8, chnl_number = vanilla_fetch()
|
||||||
|
|
||||||
additions = {**tvpass.urls, **fstv.urls}
|
additions = tvpass.urls | fstv.urls
|
||||||
|
|
||||||
lines = []
|
lines = []
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,12 @@ from bs4 import BeautifulSoup
|
||||||
|
|
||||||
urls: dict[str, str] = {}
|
urls: dict[str, str] = {}
|
||||||
|
|
||||||
mirrors = {"https://fstv.online", "https://fstv.space", "https://fstv.zip"}
|
mirrors = {
|
||||||
|
"https://fstv.online",
|
||||||
|
"https://fstv.space",
|
||||||
|
"https://fstv.zip",
|
||||||
|
"https://fstv.us",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def check_status(client: httpx.Client, url: str) -> bool:
|
def check_status(client: httpx.Client, url: str) -> bool:
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,12 @@ TZ = pytz.timezone("America/New_York")
|
||||||
def cache_expired(t: float) -> bool:
|
def cache_expired(t: float) -> bool:
|
||||||
now = datetime.now(TZ)
|
now = datetime.now(TZ)
|
||||||
|
|
||||||
r = now.replace(hour=11, minute=0, second=0, microsecond=0)
|
eleven = now.replace(hour=11, minute=0, second=0, microsecond=0)
|
||||||
|
|
||||||
if now < r:
|
if now < eleven:
|
||||||
r -= timedelta(days=1)
|
eleven -= timedelta(days=1)
|
||||||
|
|
||||||
return t < r.timestamp()
|
return t < eleven.timestamp()
|
||||||
|
|
||||||
|
|
||||||
def load_cache() -> dict[str, str]:
|
def load_cache() -> dict[str, str]:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue