forked from doms/iptv
e
This commit is contained in:
parent
00000d9247
commit
00000d9bb4
1 changed files with 4 additions and 5 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from urllib.parse import urljoin
|
|
||||||
|
|
||||||
from playwright.async_api import Browser
|
from playwright.async_api import Browser
|
||||||
|
|
||||||
|
|
@ -16,9 +15,9 @@ CACHE_FILE = Cache(TAG, exp=10_800)
|
||||||
API_FILE = Cache(f"{TAG}-api", exp=19_800)
|
API_FILE = Cache(f"{TAG}-api", exp=19_800)
|
||||||
|
|
||||||
MIRRORS = [
|
MIRRORS = [
|
||||||
"https://old.ppv.to",
|
"https://old.ppv.to/api/streams",
|
||||||
"https://api.ppvs.su",
|
"https://api.ppvs.su/api/streams",
|
||||||
"https://api.ppv.to",
|
"https://api.ppv.to/api/streams",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -30,7 +29,7 @@ async def get_events(url: str, cached_keys: list[str]) -> list[dict[str, str]]:
|
||||||
|
|
||||||
api_data = {"timestamp": now.timestamp()}
|
api_data = {"timestamp": now.timestamp()}
|
||||||
|
|
||||||
if r := await network.request(urljoin(url, "api/streams"), log=log):
|
if r := await network.request(url, log=log):
|
||||||
api_data: dict = r.json()
|
api_data: dict = r.json()
|
||||||
|
|
||||||
API_FILE.write(api_data)
|
API_FILE.write(api_data)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue