Compare commits

...

36 commits

Author SHA1 Message Date
GitHub Actions Bot
a045de118f health log 2026-02-24 23:34:34 -05:00
GitHub Actions Bot
a4b351be7d update EPG 2026-02-25 04:33:12 +00:00
GitHub Actions Bot
6b88381c03 update M3U8 2026-02-24 23:30:55 -05:00
GitHub Actions Bot
b9d85c9c32 update M3U8 2026-02-24 23:01:21 -05:00
GitHub Actions Bot
5f812edf04 update M3U8 2026-02-24 22:31:15 -05:00
GitHub Actions Bot
ea6a228936 update M3U8 2026-02-24 22:02:06 -05:00
GitHub Actions Bot
a368bf064d update M3U8 2026-02-24 21:31:48 -05:00
GitHub Actions Bot
5026c896f0 update M3U8 2026-02-24 21:03:29 -05:00
GitHub Actions Bot
e2197005c3 update M3U8 2026-02-24 20:32:11 -05:00
GitHub Actions Bot
7d586d105b update M3U8 2026-02-24 20:04:35 -05:00
GitHub Actions Bot
c7ddfbacc5 update M3U8 2026-02-24 19:35:29 -05:00
GitHub Actions Bot
1f89ea3b88 update M3U8 2026-02-24 19:05:28 -05:00
GitHub Actions Bot
1e486db1c2 update M3U8 2026-02-24 18:31:43 -05:00
GitHub Actions Bot
ce85627c83 update M3U8 2026-02-24 18:01:40 -05:00
doms9
00000d9069 e 2026-02-24 17:36:06 -05:00
doms9
00000d9476 e
- re-add volokit.py
2026-02-24 17:33:51 -05:00
GitHub Actions Bot
f504eb2131 update M3U8 2026-02-24 17:31:14 -05:00
GitHub Actions Bot
7cdabaea4a update M3U8 2026-02-24 17:01:35 -05:00
GitHub Actions Bot
70eaf724af health log 2026-02-24 16:37:35 -05:00
GitHub Actions Bot
2d20f1594c update M3U8 2026-02-24 16:31:25 -05:00
GitHub Actions Bot
695e7f2ce6 update M3U8 2026-02-24 16:01:55 -05:00
GitHub Actions Bot
b0b17e414f update M3U8 2026-02-24 15:31:15 -05:00
GitHub Actions Bot
4ce3776445 update M3U8 2026-02-24 15:09:07 -05:00
GitHub Actions Bot
0273a40f80 update EPG 2026-02-24 19:38:03 +00:00
GitHub Actions Bot
7a8c6c18bc update M3U8 2026-02-24 14:32:28 -05:00
GitHub Actions Bot
a67d88d96b update M3U8 2026-02-24 14:05:00 -05:00
GitHub Actions Bot
15fb2b6078 update M3U8 2026-02-24 13:32:46 -05:00
GitHub Actions Bot
0da5b22507 update M3U8 2026-02-24 13:03:29 -05:00
GitHub Actions Bot
054e6cb51e update M3U8 2026-02-24 12:03:27 -05:00
GitHub Actions Bot
40bb3a2e9d update M3U8 2026-02-24 11:02:41 -05:00
GitHub Actions Bot
368f61c5bb health log 2026-02-24 15:18:04 +00:00
GitHub Actions Bot
6243c2906b update M3U8 2026-02-24 10:01:50 -05:00
GitHub Actions Bot
da3edbc3d3 update M3U8 2026-02-24 09:02:12 -05:00
GitHub Actions Bot
8953be4880 update M3U8 2026-02-24 08:02:32 -05:00
GitHub Actions Bot
aaf0e00999 update EPG 2026-02-24 11:26:55 +00:00
GitHub Actions Bot
6ac2f7d95a health log 2026-02-24 09:13:04 +00:00
9 changed files with 108423 additions and 103108 deletions

File diff suppressed because it is too large Load diff

208369
M3U8/TV.xml

File diff suppressed because one or more lines are too long

View file

@ -3,8 +3,8 @@
#EXTINF:-1 tvg-chno="1" tvg-id="A.and.E.HD.East.us2" tvg-name="A&E TV" tvg-logo="http://schedulesdirect-api20141201-logos.s3.dualstack.us-east-1.amazonaws.com/stationLogos/s51529_dark_360w_270h.png" group-title="TV",A&E TV
http://41.205.93.154/AandE/index.m3u8
#EXTINF:-1 tvg-chno="2" tvg-id="WFAA-DT.us_locals1" tvg-name="ABC" tvg-logo="http://schedulesdirect-api20141201-logos.s3.dualstack.us-east-1.amazonaws.com/stationLogos/s10003_dark_360w_270h.png" group-title="TV",ABC
http://stream.cammonitorplus.net/1762/index.m3u8?token=MnE3ZWg1YkgxdFdWZlo2c2hLMkltWnJhcFo1OHhxcXVyb2pKazZXaWxZRERxNEduaVp1UnBxU2VlWmF0ZnRlRGxaMm1zNStDbnJOOXFZMlhtcStybmc9PQ==
#EXTINF:-1 tvg-chno="2" tvg-id="KMBC-DT.us_locals1" tvg-name="ABC" tvg-logo="http://schedulesdirect-api20141201-logos.s3.dualstack.us-east-1.amazonaws.com/stationLogos/s10003_dark_360w_270h.png" group-title="TV",ABC
http://stream.cammonitorplus.net/1790/index.m3u8?token=MnE3ZWg1YkgxdFdWZlo2c2hLMkltWnJhcFo1OHhxcXVyb2pKazZXaWxZRERxNEduaVp1UnBxU2VlWmF0ZnRlRGxaMm1zNStDbnJOOXFZMlhtcStybmc9PQ==
#EXTINF:-1 tvg-chno="3" tvg-id="ACC.Network.us2" tvg-name="ACC Network" tvg-logo="https://schedulesdirect-api20141201-logos.s3.dualstack.us-east-1.amazonaws.com/stationLogos/s111871_dark_360w_270h.png" group-title="TV",ACC Network
http://23.239.31.26:8989/accnetwork/index.m3u8

File diff suppressed because it is too large Load diff

View file

@ -23,6 +23,7 @@ from scrapers import (
streamsgate,
totalsportek,
tvapp,
volokit,
watchfooty,
webcast,
xstreameast,
@ -83,6 +84,7 @@ async def main() -> None:
# asyncio.create_task(streambtw.scrape()),
asyncio.create_task(totalsportek.scrape()),
asyncio.create_task(tvapp.scrape()),
asyncio.create_task(volokit.scrape()),
asyncio.create_task(xstreameast.scrape()),
]
@ -118,6 +120,7 @@ async def main() -> None:
| streamsgate.urls
| totalsportek.urls
| tvapp.urls
| volokit.urls
| watchfooty.urls
| webcast.urls
| xstreameast.urls

View file

@ -91,6 +91,7 @@ class Time(datetime):
"%m/%d/%Y %I:%M %p",
"%m/%d/%Y %H:%M:%S",
"%a, %d %b %Y %H:%M:%S %z",
"%A, %b %d, %Y %H:%M",
]
for frmt in formats:

230
M3U8/scrapers/volokit.py Normal file
View file

@ -0,0 +1,230 @@
import asyncio
import re
from functools import partial
from urllib.parse import urljoin
from selectolax.parser import HTMLParser
from .utils import Cache, Time, get_logger, leagues, network
log = get_logger(__name__)
urls: dict[str, dict[str, str | float]] = {}
TAG = "VOLOKIT"
CACHE_FILE = Cache(TAG, exp=10_800)
HTML_CACHE = Cache(f"{TAG}-html", exp=28_800)
BASE_URL = "http://volokit.xyz"
SPORT_ENDPOINTS = {
"mlb": "MLB",
# "nfl": "NFL",
# "nhl": "NHL",
}
def fix_event(s: str) -> str:
return " ".join(x.capitalize() for x in s.split())
async def process_event(url: str, url_num: int) -> str | None:
if not (event_data := await network.request(url, log=log)):
log.info(f"URL {url_num}) Failed to load url.")
return
soup = HTMLParser(event_data.content)
if not (iframe := soup.css_first('iframe[height="100%"]')):
log.warning(f"URL {url_num}) No iframe element found.")
return
if not (iframe_src := iframe.attributes.get("src")):
log.warning(f"URL {url_num}) No iframe source found.")
return
if not (
iframe_src_data := await network.request(
iframe_src,
headers={"Referer": url},
log=log,
)
):
log.info(f"URL {url_num}) Failed to load iframe source.")
return
pattern = re.compile(r'source:\s+"([^"]*)"', re.I)
if not (match := pattern.search(iframe_src_data.text)):
log.warning(f"URL {url_num}) No Clappr source found.")
return
log.info(f"URL {url_num}) Captured M3U8")
return match[1]
async def refresh_html_cache(
url: str,
sport: str,
now: Time,
) -> dict[str, dict[str, str | float]]:
events = {}
if not (html_data := await network.request(url, log=log)):
return events
soup = HTMLParser(html_data.content)
date = now.date()
if date_node := soup.css_first("tr.date"):
date = date_node.text(strip=True)
for card in soup.css("#events .table .vevent.theevent"):
if not (href := card.css_first("a").attributes.get("href")):
continue
name_node = card.css_first(".teamtd.event")
time_node = card.css_first(".time")
if not (name_node and time_node):
continue
name, time = name_node.text(strip=True), time_node.text(strip=True)
event_sport = SPORT_ENDPOINTS[sport]
event_name = fix_event(name)
event_dt = Time.from_str(f"{date} {time}", timezone="UTC")
key = f"[{event_sport}] {event_name} ({TAG})"
events[key] = {
"sport": event_sport,
"event": event_name,
"link": href,
"event_ts": event_dt.timestamp(),
"timestamp": now.timestamp(),
}
return events
async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
now = Time.clean(Time.now())
if not (events := HTML_CACHE.load()):
log.info("Refreshing HTML cache")
sport_urls = {
sport: urljoin(BASE_URL, f"sport/{sport}") for sport in SPORT_ENDPOINTS
}
tasks = [
refresh_html_cache(
url,
sport,
now,
)
for sport, url in sport_urls.items()
]
results = await asyncio.gather(*tasks)
events = {k: v for data in results for k, v in data.items()}
HTML_CACHE.write(events)
live = []
start_ts = now.delta(minutes=-30).timestamp()
end_ts = now.delta(minutes=30).timestamp()
for k, v in events.items():
if k in cached_keys:
continue
if not start_ts <= v["event_ts"] <= end_ts:
continue
live.append(v)
return live
async def scrape() -> None:
cached_urls = CACHE_FILE.load()
valid_urls = {k: v for k, v in cached_urls.items() if v["url"]}
valid_count = cached_count = len(valid_urls)
urls.update(valid_urls)
log.info(f"Loaded {cached_count} event(s) from cache")
log.info(f'Scraping from "{BASE_URL}"')
events = await get_events(cached_urls.keys())
if events:
log.info(f"Processing {len(events)} new URL(s)")
for i, ev in enumerate(events, start=1):
handler = partial(
process_event,
url=(link := ev["link"]),
url_num=i,
)
url = await network.safe_process(
handler,
url_num=i,
semaphore=network.HTTP_S,
log=log,
)
sport, event, ts = (
ev["sport"],
ev["event"],
ev["event_ts"],
)
key = f"[{sport}] {event} ({TAG})"
tvg_id, logo = leagues.get_tvg_info(sport, event)
entry = {
"url": url,
"logo": logo,
"base": link,
"timestamp": ts,
"id": tvg_id or "Live.Event.us",
"link": link,
}
cached_urls[key] = entry
if url:
valid_count += 1
urls[key] = entry
if new_count := valid_count - cached_count:
log.info(f"Collected and cached {new_count} new event(s)")
else:
log.info("No new events found")
CACHE_FILE.write(cached_urls)

View file

@ -1,12 +1,12 @@
## Base Log @ 2026-02-24 04:29 UTC
## Base Log @ 2026-02-25 04:34 UTC
### ✅ Working Streams: 152<br>❌ Dead Streams: 4
| Channel | Error (Code) | Link |
| ------- | ------------ | ---- |
| Golf Channel | HTTP Error (000) | `http://hardcoremedia.xyz/live/rabdsbmz/3731346838/129706.ts` |
| HBO Comedy | HTTP Error (000) | `http://hardcoremedia.xyz/live/rabdsbmz/3731346838/257141.ts` |
| INSP | HTTP Error (404) | `http://fl12.moveonjoy.com/INSP/index.m3u8` |
| SportsNet New York | HTTP Error (404) | `http://212.102.60.231/SNY/index.m3u8` |
| TLC | HTTP Error (000) | `http://hardcoremedia.xyz/live/rabdsbmz/3731346838/129765.ts` |
---
#### Base Channels URL