Compare commits

...

37 commits

Author SHA1 Message Date
GitHub Actions Bot
17c574615d health log 2026-03-03 09:07:02 +00:00
GitHub Actions Bot
6116ed0f04 update M3U8 2026-03-02 23:31:04 -05:00
GitHub Actions Bot
0dc119558d update EPG 2026-03-03 04:27:50 +00:00
GitHub Actions Bot
47ac7989de health log 2026-03-03 04:25:52 +00:00
GitHub Actions Bot
d9b784bf22 update M3U8 2026-03-02 23:00:32 -05:00
GitHub Actions Bot
a211e316da update M3U8 2026-03-02 22:30:54 -05:00
GitHub Actions Bot
8b08ab5a5e update M3U8 2026-03-02 22:01:58 -05:00
GitHub Actions Bot
670134ba65 update M3U8 2026-03-02 21:31:02 -05:00
GitHub Actions Bot
c5af8e7b39 update M3U8 2026-03-02 21:01:56 -05:00
GitHub Actions Bot
3d893c1c0a update M3U8 2026-03-02 20:31:11 -05:00
doms9
00000d9604 e 2026-03-02 20:15:30 -05:00
doms9
00000d9ab1 e
- edit livetvsx.py scraping
2026-03-02 20:02:26 -05:00
GitHub Actions Bot
b896a22a29 update M3U8 2026-03-02 20:01:27 -05:00
GitHub Actions Bot
a481b75f71 update M3U8 2026-03-02 19:33:09 -05:00
GitHub Actions Bot
b0fd09ff50 update M3U8 2026-03-02 19:05:13 -05:00
GitHub Actions Bot
2d1c3afc35 update M3U8 2026-03-02 18:31:44 -05:00
GitHub Actions Bot
8d38c43997 update M3U8 2026-03-02 18:01:47 -05:00
GitHub Actions Bot
5d8611ce56 update M3U8 2026-03-02 17:31:38 -05:00
GitHub Actions Bot
ee7dafc20a update M3U8 2026-03-02 17:01:31 -05:00
GitHub Actions Bot
e0ad692ae1 update M3U8 2026-03-02 16:32:03 -05:00
GitHub Actions Bot
983266181e health log 2026-03-02 16:20:40 -05:00
GitHub Actions Bot
85d1b9c6b7 update M3U8 2026-03-02 16:01:48 -05:00
GitHub Actions Bot
9bad373127 health log 2026-03-02 21:00:43 +00:00
GitHub Actions Bot
91039fa206 update M3U8 2026-03-02 15:31:17 -05:00
GitHub Actions Bot
5c462dc9ac update M3U8 2026-03-02 15:02:59 -05:00
GitHub Actions Bot
2dff4cc5a5 update M3U8 2026-03-02 14:31:48 -05:00
GitHub Actions Bot
59bd648dab update EPG 2026-03-02 19:25:07 +00:00
GitHub Actions Bot
5d7deb4d19 update M3U8 2026-03-02 14:01:45 -05:00
GitHub Actions Bot
6e1099f059 update M3U8 2026-03-02 13:31:30 -05:00
GitHub Actions Bot
952076d914 update M3U8 2026-03-02 13:05:17 -05:00
GitHub Actions Bot
c0b45e4643 update M3U8 2026-03-02 12:04:04 -05:00
GitHub Actions Bot
c6f2240099 update M3U8 2026-03-02 11:04:03 -05:00
GitHub Actions Bot
c0f8ae9aca health log 2026-03-02 15:06:03 +00:00
GitHub Actions Bot
872acdf18c update M3U8 2026-03-02 10:01:29 -05:00
GitHub Actions Bot
672dc56a6c update M3U8 2026-03-02 09:02:21 -05:00
GitHub Actions Bot
c7985450b2 update M3U8 2026-03-02 08:02:21 -05:00
GitHub Actions Bot
b1278d35b8 update EPG 2026-03-02 11:22:27 +00:00
11 changed files with 101441 additions and 103662 deletions

File diff suppressed because it is too large Load diff

200406
M3U8/TV.xml

File diff suppressed because one or more lines are too long

View file

@ -4,7 +4,7 @@
http://41.205.93.154/AandE/index.m3u8
#EXTINF:-1 tvg-chno="2" tvg-id="ABC.National.Feed.us2" 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==
http://stream.cammonitorplus.net/1762/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

@ -1,8 +1,9 @@
import asyncio
import re
from functools import partial
import feedparser
from playwright.async_api import Browser, Page
from playwright.async_api import Browser, Page, TimeoutError
from .utils import Cache, Time, get_logger, leagues, network
@ -24,15 +25,30 @@ VALID_SPORTS = [
"Basketball",
"Football",
"Ice Hockey",
"Wrestling",
]
def fix_url(s: str) -> str | None:
pattern = re.compile(r"eventinfo\/(\d*)", re.I)
if not (match := pattern.search(s)):
return
elif not (event_id := match[1]).isalnum():
return
return f"https://cdn.livetv872.me/cache/links/en.{event_id}.html"
async def process_event(
url: str,
url_num: int,
page: Page,
) -> str | None:
event_id_pattern = re.compile(r"&c=(\d*)", re.I)
captured: list[str] = []
got_one = asyncio.Event()
@ -46,40 +62,33 @@ async def process_event(
page.on("request", handler)
try:
await page.goto(
resp = await page.goto(
url,
wait_until="domcontentloaded",
timeout=10_000,
)
await page.wait_for_timeout(1_500)
if resp.status != 200:
log.warning(f"URL {url_num}) Status Code: {resp.status}")
return
buttons = await page.query_selector_all(".lnktbj a[href*='webplayer']")
try:
event_a = page.locator('a[title*="Aliez"]').first
labels = await page.eval_on_selector_all(
".lnktyt span",
"elements => elements.map(el => el.textContent.trim().toLowerCase())",
)
for btn, label in zip(buttons, labels):
if label in ["web", "youtube"]:
continue
if not (href := await btn.get_attribute("href")):
continue
break
else:
href = await event_a.get_attribute("href", timeout=1_250)
except TimeoutError:
log.warning(f"URL {url_num}) No valid sources found.")
return
href = href if href.startswith("http") else f"https:{href}"
href.replace("livetv.sx", "livetv873.me")
if (match := event_id_pattern.search(href)) and (
event_id := match[1]
).isalnum():
event_url = f"https://emb.apl392.me/player/live.php?id={event_id}"
else:
event_url = href if href.startswith("http") else f"https:{href}"
await page.goto(
href,
event_url,
wait_until="domcontentloaded",
timeout=5_000,
)
@ -130,7 +139,7 @@ async def refresh_xml_cache(now_ts: float) -> dict[str, dict[str, str | float]]:
if not (date := entry.get("published")):
continue
if not (link := entry.get("link")):
if (not (link := entry.get("link"))) or (not (fixed_link := fix_url(link))):
continue
if not (title := entry.get("title")):
@ -151,7 +160,7 @@ async def refresh_xml_cache(now_ts: float) -> dict[str, dict[str, str | float]]:
"sport": sport,
"league": league,
"event": title,
"link": link.replace("livetv.sx", "livetv873.me"),
"link": fixed_link,
"event_ts": event_dt.timestamp(),
"timestamp": now_ts,
}

View file

@ -19,12 +19,17 @@ BASE_URL = "https://pixelsport.tv"
async def get_api_data(page: Page) -> dict[str, list[dict, str, str]]:
try:
await page.goto(
resp = await page.goto(
url := urljoin(BASE_URL, "backend/livetv/events"),
wait_until="domcontentloaded",
timeout=6_000,
)
if resp.status != 200:
log.warning(f"{url} Status Code: {resp.status}")
return {}
raw_json = await page.locator("pre").inner_text(timeout=5_000)
except Exception as e:
log.error(f'Failed to fetch "{url}": {e}')

View file

@ -93,12 +93,16 @@ async def process_event(
page.on("request", handler)
try:
await page.goto(
resp = await page.goto(
url,
wait_until="domcontentloaded",
timeout=6_000,
)
if resp.status != 200:
log.warning(f"URL {url_num}) Status Code: {resp.status}")
return
try:
if btn := await page.wait_for_selector(
"button.streambutton:nth-of-type(1)",

View file

@ -54,7 +54,7 @@ def get_logger(name: str | None = None) -> logging.Logger:
LOG_DIR / "fetch.log",
when="midnight",
interval=1,
backupCount=3,
backupCount=1,
encoding="utf-8",
utc=False,
)

View file

@ -250,12 +250,17 @@ class Network:
page.on("request", handler)
try:
await page.goto(
resp = await page.goto(
url,
wait_until="domcontentloaded",
timeout=6_000,
)
if resp.status != 200:
log.warning(f"URL {url_num}) Status Code: {resp.status}")
return
wait_task = asyncio.create_task(got_one.wait())
try:

View file

@ -89,12 +89,16 @@ async def process_event(
page.on("request", handler)
try:
await page.goto(
resp = await page.goto(
url,
wait_until="domcontentloaded",
timeout=8_000,
)
if resp.status != 200:
log.warning(f"URL {url_num}) Status Code: {resp.status}")
return
await page.wait_for_timeout(2_000)
try:

View file

@ -1,12 +1,10 @@
## Base Log @ 2026-03-02 09:06 UTC
## Base Log @ 2026-03-03 09:07 UTC
### ✅ Working Streams: 158<br>❌ Dead Streams: 3
### ✅ Working Streams: 160<br>❌ Dead Streams: 1
| Channel | Error (Code) | Link |
| ------- | ------------ | ---- |
| CMT | HTTP Error (404) | `http://23.237.104.106:8080/USA_CMT/index.m3u8` |
| Golf Channel | HTTP Error (000) | `http://hardcoremedia.xyz/live/rabdsbmz/3731346838/258721.ts` |
| NBC Sports California | HTTP Error (403) | `http://hardcoremedia.xyz/live/rabdsbmz/3731346838/136474.ts` |
---
#### Base Channels URL
```