rename tvpass.py -> tvapp.py
misc edits
This commit is contained in:
doms9 2026-02-11 14:45:05 -05:00
parent edf6618aa8
commit 00000d9b17
3 changed files with 11 additions and 11 deletions

View file

@ -21,7 +21,7 @@ from scrapers import (
streamhub, streamhub,
streamsgate, streamsgate,
totalsportek, totalsportek,
tvpass, tvapp,
watchfooty, watchfooty,
webcast, webcast,
xstreameast, xstreameast,
@ -71,7 +71,7 @@ async def main() -> None:
# asyncio.create_task(streamhub.scrape(xtrnl_brwsr)), # asyncio.create_task(streamhub.scrape(xtrnl_brwsr)),
asyncio.create_task(streamsgate.scrape(xtrnl_brwsr)), asyncio.create_task(streamsgate.scrape(xtrnl_brwsr)),
asyncio.create_task(totalsportek.scrape(hdl_brwsr)), asyncio.create_task(totalsportek.scrape(hdl_brwsr)),
asyncio.create_task(tvpass.scrape(hdl_brwsr)), asyncio.create_task(tvapp.scrape(hdl_brwsr)),
# asyncio.create_task(webcast.scrape(hdl_brwsr)), # asyncio.create_task(webcast.scrape(hdl_brwsr)),
] ]
@ -114,7 +114,7 @@ async def main() -> None:
| streamhub.urls | streamhub.urls
| streamsgate.urls | streamsgate.urls
| totalsportek.urls | totalsportek.urls
| tvpass.urls | tvapp.urls
| watchfooty.urls | watchfooty.urls
| webcast.urls | webcast.urls
| xstreameast.urls | xstreameast.urls

View file

@ -165,19 +165,19 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
XML_CACHE.write(events) XML_CACHE.write(events)
live = []
start_ts = now.delta(hours=-1).timestamp() start_ts = now.delta(hours=-1).timestamp()
end_ts = now.delta(minutes=5).timestamp() end_ts = now.delta(minutes=5).timestamp()
live = []
for k, v in events.items(): for k, v in events.items():
if k in cached_keys: if k in cached_keys:
continue continue
if not ( if (
v["sport"] in VALID_SPORTS v["sport"] not in VALID_SPORTS
or v["league"] in VALID_SPORTS and v["league"] not in VALID_SPORTS
or v["event"].lower() == "olympic games" and v["event"].lower() != "olympic games"
): ):
continue continue

View file

@ -10,11 +10,11 @@ log = get_logger(__name__)
urls: dict[str, dict[str, str | float]] = {} urls: dict[str, dict[str, str | float]] = {}
TAG = "TVPASS" TAG = "TVAPP"
CACHE_FILE = Cache(TAG, exp=10_800) CACHE_FILE = Cache(TAG, exp=10_800)
HTML_CACHE = Cache(f"{TAG}-html", exp=28_800) HTML_CACHE = Cache(f"{TAG}-html", exp=19_800)
BASE_URL = "https://thetvapp.to" BASE_URL = "https://thetvapp.to"