Compare commits

..

No commits in common. "225cae4595d41391ebfd2034c81d0f3e4c4c6a2e" and "65d570d6f0704dad20a1a6e71383cf75b8423cdf" have entirely different histories.

7 changed files with 115443 additions and 118421 deletions

File diff suppressed because it is too large Load diff

228074
M3U8/TV.xml

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -12,6 +12,7 @@ from scrapers import (
livetvsx, livetvsx,
ovogoal, ovogoal,
pawa, pawa,
pixel,
ppv, ppv,
roxie, roxie,
shark, shark,
@ -65,6 +66,7 @@ async def main() -> None:
pw_tasks = [ pw_tasks = [
asyncio.create_task(cdnlivetv.scrape(hdl_brwsr)), asyncio.create_task(cdnlivetv.scrape(hdl_brwsr)),
asyncio.create_task(embedhd.scrape(hdl_brwsr)), asyncio.create_task(embedhd.scrape(hdl_brwsr)),
# asyncio.create_task(pixel.scrape(hdl_brwsr)),
asyncio.create_task(ppv.scrape(xtrnl_brwsr)), asyncio.create_task(ppv.scrape(xtrnl_brwsr)),
asyncio.create_task(roxie.scrape(hdl_brwsr)), asyncio.create_task(roxie.scrape(hdl_brwsr)),
asyncio.create_task(sportzone.scrape(xtrnl_brwsr)), asyncio.create_task(sportzone.scrape(xtrnl_brwsr)),
@ -109,6 +111,7 @@ async def main() -> None:
| livetvsx.urls | livetvsx.urls
| ovogoal.urls | ovogoal.urls
| pawa.urls | pawa.urls
| pixel.urls
| ppv.urls | ppv.urls
| roxie.urls | roxie.urls
| shark.urls | shark.urls

107
M3U8/scrapers/pixel.py Normal file
View file

@ -0,0 +1,107 @@
import json
from functools import partial
from urllib.parse import urljoin
from playwright.async_api import Browser, Page
from .utils import Cache, Time, get_logger, leagues, network
log = get_logger(__name__)
urls: dict[str, dict[str, str | float]] = {}
TAG = "PIXEL"
CACHE_FILE = Cache(TAG, exp=19_800)
BASE_URL = "https://pixelsport.tv"
async def get_api_data(page: Page) -> dict[str, list[dict, str, str]]:
try:
resp = await page.goto(
url := urljoin(BASE_URL, "backend/livetv/events"),
wait_until="domcontentloaded",
timeout=6_000,
)
if not resp or resp.status != 200:
log.warning(f"{url} Status Code: {resp.status if resp else 'None'}")
return {}
raw_json = await page.locator("pre").inner_text(timeout=5_000)
except Exception as e:
log.error(f'Failed to fetch "{url}": {e}')
return {}
return json.loads(raw_json)
async def get_events(page: Page) -> dict[str, dict[str, str | float]]:
now = Time.clean(Time.now())
api_data = await get_api_data(page)
events = {}
for event in api_data.get("events", []):
event_dt = Time.from_str(event["date"], timezone="UTC")
if event_dt.date() != now.date():
continue
event_name = event["match_name"]
channel_info: dict[str, str] = event["channel"]
category: dict[str, str] = channel_info["TVCategory"]
sport = category["name"]
stream_urls = [(i, f"server{i}URL") for i in range(1, 4)]
for z, stream_url in stream_urls:
if (stream_link := channel_info.get(stream_url)) and stream_link != "null":
key = f"[{sport}] {event_name} {z} ({TAG})"
tvg_id, logo = leagues.get_tvg_info(sport, event_name)
events[key] = {
"url": stream_link,
"logo": logo,
"base": BASE_URL,
"timestamp": now.timestamp(),
"id": tvg_id or "Live.Event.us",
}
return events
async def scrape(browser: Browser) -> None:
if cached := CACHE_FILE.load():
urls.update(cached)
log.info(f"Loaded {len(urls)} event(s) from cache")
return
log.info(f'Scraping from "{BASE_URL}"')
async with network.event_context(browser) as context:
async with network.event_page(context) as page:
handler = partial(get_events, page=page)
events = await network.safe_process(
handler,
url_num=1,
semaphore=network.PW_S,
log=log,
)
urls.update(events or {})
log.info(f"Collected and cached {len(urls)} new event(s)")
CACHE_FILE.write(urls)

View file

@ -59,6 +59,8 @@ async def refresh_html_cache(
sport = sport_node.text(strip=True) sport = sport_node.text(strip=True)
logo = section.css_first(".league-icon img").attributes.get("src")
for event in section.css(".section-event"): for event in section.css(".section-event"):
event_name = "Live Event" event_name = "Live Event"
@ -84,6 +86,7 @@ async def refresh_html_cache(
"sport": sport, "sport": sport,
"event": event_name, "event": event_name,
"link": href, "link": href,
"logo": logo,
"event_ts": event_dt.timestamp(), "event_ts": event_dt.timestamp(),
"timestamp": ts, "timestamp": ts,
} }
@ -165,19 +168,20 @@ async def scrape(browser: Browser) -> None:
log=log, log=log,
) )
sport, event, ts = ( sport, event, logo, ts = (
ev["sport"], ev["sport"],
ev["event"], ev["event"],
ev["logo"],
ev["event_ts"], ev["event_ts"],
) )
key = f"[{sport}] {event} ({TAG})" key = f"[{sport}] {event} ({TAG})"
tvg_id, logo = leagues.get_tvg_info(sport, event) tvg_id, pic = leagues.get_tvg_info(sport, event)
entry = { entry = {
"url": url, "url": url,
"logo": logo, "logo": logo or pic,
"base": "https://storytrench.net/", "base": "https://storytrench.net/",
"timestamp": ts, "timestamp": ts,
"id": tvg_id or "Live.Event.us", "id": tvg_id or "Live.Event.us",

View file

@ -1,52 +1,12 @@
## Base Log @ 2026-03-12 09:06 UTC ## Base Log @ 2026-03-11 09:05 UTC
### ✅ Working Streams: 118<br>❌ Dead Streams: 43 ### ✅ Working Streams: 158<br>❌ Dead Streams: 3
| Channel | Error (Code) | Link | | Channel | Error (Code) | Link |
| ------- | ------------ | ---- | | ------- | ------------ | ---- |
| Antenna TV | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20180.m3u8` | | HBO Family | HTTP Error (403) | `http://mytvstream.net:8080/live/30550113/30550113/17772.m3u8` |
| Aspire | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/21927.m3u8` | | Hallmark Family | HTTP Error (403) | `http://mytvstream.net:8080/live/30550113/30550113/9307.m3u8` |
| CW | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/120889.m3u8` | | NBC Sports California | HTTP Error (403) | `http://mytvstream.net:8080/live/30550113/30550113/20940.m3u8` |
| Discovery Family Channel | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/57347.m3u8` |
| Discovery Life | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/9861.m3u8` |
| Discovery Science | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20866.m3u8` |
| FDSN Detroit | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20930.m3u8` |
| FDSN Florida | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/46794.m3u8` |
| FDSN Midwest | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/66795.m3u8` |
| FDSN North | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/58827.m3u8` |
| FDSN Ohio | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/17752.m3u8` |
| FDSN Oklahoma | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20934.m3u8` |
| FDSN SoCal | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/221151.m3u8` |
| FDSN Southeast | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/2213.m3u8` |
| FDSN Southwest | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/21843.m3u8` |
| FDSN Sun | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/104917.m3u8` |
| FDSN West | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20932.m3u8` |
| FDSN Wisconsin | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/78599.m3u8` |
| Grit TV | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20861.m3u8` |
| HBO Family | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/17772.m3u8` |
| Hallmark Family | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/9307.m3u8` |
| Hallmark Mystery | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/10289.m3u8` |
| History Channel | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/15017.m3u8` |
| ION TV | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/9297.m3u8` |
| Investigation Discovery | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/46810.m3u8` |
| MSNBC | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/9296.m3u8` |
| Marquee Sports Network | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/13379.m3u8` |
| MotorTrend TV | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/10399.m3u8` |
| NBC Sports Boston | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20939.m3u8` |
| NBC Sports California | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20940.m3u8` |
| NBC Sports Philadelphia | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20943.m3u8` |
| NewsNation | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/161450.m3u8` |
| Pop TV | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20976.m3u8` |
| Showtime Extreme | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/13220.m3u8` |
| Smithsonian Channel | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/31150.m3u8` |
| Sony Movie Channel | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/2214.m3u8` |
| Space City Home Network | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/213668.m3u8` |
| SportsNet Pittsburgh | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/108178.m3u8` |
| TV Land | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/46696.m3u8` |
| TV One | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20868.m3u8` |
| Tennis Channel | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/20184.m3u8` |
| The Weather Channel | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/18926.m3u8` |
| getTV | HTTP Error (404) | `http://mytvstream.net:8080/live/30550113/30550113/18366.m3u8` |
--- ---
#### Base Channels URL #### Base Channels URL
``` ```