Compare commits

...

36 commits

Author SHA1 Message Date
GitHub Actions Bot
bb156f5f84 update M3U8 2026-04-15 12:01:18 -04:00
GitHub Actions Bot
5f19ac92fd health log 2026-04-15 15:46:17 +00:00
GitHub Actions Bot
64709869d8 update M3U8 2026-04-15 11:00:59 -04:00
GitHub Actions Bot
87995197c9 update M3U8 2026-04-15 10:00:57 -04:00
GitHub Actions Bot
c1bf17a1af update M3U8 2026-04-15 09:01:06 -04:00
GitHub Actions Bot
371667c264 update M3U8 2026-04-15 08:04:20 -04:00
GitHub Actions Bot
1cc81fa711 update EPG 2026-04-15 11:38:44 +00:00
GitHub Actions Bot
5fd37d1d50 health log 2026-04-15 09:56:18 +00:00
GitHub Actions Bot
3497fb1f15 update EPG 2026-04-15 05:12:44 +00:00
GitHub Actions Bot
0312da3363 health log 2026-04-15 05:10:47 +00:00
GitHub Actions Bot
c5362f787b update M3U8 2026-04-14 23:30:36 -04:00
GitHub Actions Bot
dfdbdee05f update M3U8 2026-04-14 22:30:49 -04:00
GitHub Actions Bot
7043b8f059 update M3U8 2026-04-14 22:00:55 -04:00
GitHub Actions Bot
b6e5a4a592 update M3U8 2026-04-14 21:30:52 -04:00
GitHub Actions Bot
9b5a820012 update M3U8 2026-04-14 21:01:03 -04:00
doms9
00000d92e4 e 2026-04-14 20:55:38 -04:00
doms9
00000d991c e
- edit scraping method for webcast.py
2026-04-14 20:51:35 -04:00
GitHub Actions Bot
fba6702925 update M3U8 2026-04-14 20:31:18 -04:00
GitHub Actions Bot
963baf2546 update M3U8 2026-04-14 20:01:17 -04:00
GitHub Actions Bot
9b20d30153 health log 2026-04-14 19:50:22 -04:00
GitHub Actions Bot
48f4eb46b5 update M3U8 2026-04-14 19:31:09 -04:00
GitHub Actions Bot
9f0b67fc44 update M3U8 2026-04-14 19:04:21 -04:00
GitHub Actions Bot
870f893308 update M3U8 2026-04-14 18:31:31 -04:00
GitHub Actions Bot
e162047495 update M3U8 2026-04-14 18:00:44 -04:00
GitHub Actions Bot
73b3e141bf update M3U8 2026-04-14 17:31:09 -04:00
GitHub Actions Bot
42cca5c278 health log 2026-04-14 21:12:15 +00:00
GitHub Actions Bot
7b67647994 update M3U8 2026-04-14 17:00:22 -04:00
GitHub Actions Bot
42a22188fb update M3U8 2026-04-14 16:30:51 -04:00
GitHub Actions Bot
fe362d53f7 update M3U8 2026-04-14 16:01:17 -04:00
GitHub Actions Bot
39b6f8764e update EPG 2026-04-14 19:51:42 +00:00
GitHub Actions Bot
a0bbcc855d update M3U8 2026-04-14 15:30:55 -04:00
GitHub Actions Bot
3d1e85151c update M3U8 2026-04-14 15:01:23 -04:00
GitHub Actions Bot
110d7dc60c update M3U8 2026-04-14 14:30:35 -04:00
GitHub Actions Bot
440d7712c7 update M3U8 2026-04-14 14:00:58 -04:00
GitHub Actions Bot
31dbc1f988 update M3U8 2026-04-14 13:33:30 -04:00
GitHub Actions Bot
ca76d89fcc update M3U8 2026-04-14 13:00:39 -04:00
7 changed files with 114568 additions and 116526 deletions

File diff suppressed because it is too large Load diff

227897
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

@ -67,7 +67,6 @@ async def main() -> None:
# asyncio.create_task(fsports.scrape(xtrnl_brwsr)), # asyncio.create_task(fsports.scrape(xtrnl_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(webcast.scrape(hdl_brwsr)),
] ]
httpx_tasks = [ httpx_tasks = [
@ -84,12 +83,13 @@ async def main() -> None:
asyncio.create_task(streamtpnew.scrape()), asyncio.create_task(streamtpnew.scrape()),
asyncio.create_task(totalsportek.scrape()), asyncio.create_task(totalsportek.scrape()),
asyncio.create_task(tvapp.scrape()), asyncio.create_task(tvapp.scrape()),
asyncio.create_task(webcast.scrape()),
] ]
await asyncio.gather(*(pw_tasks + httpx_tasks)) await asyncio.gather(*(pw_tasks + httpx_tasks))
# others # others
# await livetvsx.scrape(xtrnl_brwsr) await livetvsx.scrape(xtrnl_brwsr)
await watchfooty.scrape(xtrnl_brwsr) await watchfooty.scrape(xtrnl_brwsr)
finally: finally:

View file

@ -13,7 +13,7 @@ urls: dict[str, dict[str, str | float]] = {}
TAG = "ROXIE" TAG = "ROXIE"
CACHE_FILE = Cache(TAG, exp=19_800) CACHE_FILE = Cache(TAG, exp=28_800)
BASE_URL = "https://roxiestreams.su" BASE_URL = "https://roxiestreams.su"
@ -26,7 +26,7 @@ SPORT_URLS = {
for sport in [ for sport in [
"Fighting", "Fighting",
"MLB", "MLB",
# "NBA", "NBA",
"NHL", "NHL",
"Soccer", "Soccer",
] ]

View file

@ -1,7 +1,9 @@
import ast
import asyncio import asyncio
import re
from functools import partial from functools import partial
from urllib.parse import urljoin
from playwright.async_api import Browser
from selectolax.parser import HTMLParser from selectolax.parser import HTMLParser
from .utils import Cache, Time, get_logger, leagues, network from .utils import Cache, Time, get_logger, leagues, network
@ -12,7 +14,7 @@ urls: dict[str, dict[str, str | float]] = {}
TAG = "WEBCAST" TAG = "WEBCAST"
CACHE_FILE = Cache(TAG, exp=19_800) CACHE_FILE = Cache(TAG, exp=12_600)
BASE_URLS = { BASE_URLS = {
"MLB": "https://mlbwebcast.com", "MLB": "https://mlbwebcast.com",
@ -25,6 +27,70 @@ def fix_event(s: str) -> str:
return " vs ".join(s.split("@")) return " vs ".join(s.split("@"))
async def process_event(
url: str,
url_num: int,
sport: str,
) -> str | None:
if not (event_data := await network.request(url, log=log)):
log.warning(f"URL {url_num}) Failed to load url.")
return
soup = HTMLParser(event_data.content)
if not (iframe := soup.css_first('iframe[name="srcFrame"]')):
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.warning(f"URL {url_num}) Failed to load iframe source.")
return
pattern = re.compile(r'var\s+\w*=\[([^"]*)\];', re.I)
if not (match := pattern.search(iframe_src_data.text)):
log.warning(f"URL {url_num}) No Clappr source found.")
return
try:
ev_id, ev_ts, ev_pt = ast.literal_eval(match[1])
except ValueError:
log.warning(f"URL {url_num}) Failed to parse event info.")
return
params: dict[str, int | str] = dict(zip(["id", "ts", "pt"], [ev_id, ev_ts, ev_pt]))
if not (
api_data := await network.request(
urljoin(BASE_URLS[sport], "stream/check_stream.php"),
headers={"Referer": iframe_src},
params=params,
log=log,
)
):
log.warning(f"URL {url_num}) Failed to make php request.")
return
elif (data := api_data.json()).get("error"):
log.warning(f"URL {url_num}) Failed to make php request.")
return
log.info(f"URL {url_num}) Captured M3U8")
return data.get("url")
async def get_events(cached_keys: list[str]) -> list[dict[str, str]]: async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
tasks = [network.request(url, log=log) for url in BASE_URLS.values()] tasks = [network.request(url, log=log) for url in BASE_URLS.values()]
@ -70,7 +136,7 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
return events return events
async def scrape(browser: Browser) -> None: async def scrape() -> None:
cached_urls = CACHE_FILE.load() cached_urls = CACHE_FILE.load()
valid_urls = {k: v for k, v in cached_urls.items() if v["url"]} valid_urls = {k: v for k, v in cached_urls.items() if v["url"]}
@ -88,45 +154,42 @@ async def scrape(browser: Browser) -> None:
now = Time.clean(Time.now()) now = Time.clean(Time.now())
async with network.event_context(browser) as context: for i, ev in enumerate(events, start=1):
for i, ev in enumerate(events, start=1): handler = partial(
async with network.event_page(context) as page: process_event,
handler = partial( url=(link := ev["link"]),
network.process_event, url_num=i,
url=(link := ev["link"]), sport=(sport := ev["sport"]),
url_num=i, )
page=page,
log=log,
)
url = await network.safe_process( url = await network.safe_process(
handler, handler,
url_num=i, url_num=i,
semaphore=network.PW_S, semaphore=network.PW_S,
log=log, log=log,
) )
sport, event = ev["sport"], ev["event"] event = ev["event"]
key = f"[{sport}] {event} ({TAG})" key = f"[{sport}] {event} ({TAG})"
tvg_id, logo = leagues.get_tvg_info(sport, event) tvg_id, logo = leagues.get_tvg_info(sport, event)
entry = { entry = {
"url": url, "url": url,
"logo": logo, "logo": logo,
"base": BASE_URLS[sport], "base": BASE_URLS[sport],
"timestamp": now.timestamp(), "timestamp": now.timestamp(),
"id": tvg_id or "Live.Event.us", "id": tvg_id or "Live.Event.us",
"link": link, "link": link,
} }
cached_urls[key] = entry cached_urls[key] = entry
if url: if url:
valid_count += 1 valid_count += 1
urls[key] = entry urls[key] = entry
log.info(f"Collected and cached {valid_count - cached_count} new event(s)") log.info(f"Collected and cached {valid_count - cached_count} new event(s)")

View file

@ -1,17 +1,21 @@
## Base Log @ 2026-04-14 15:48 UTC ## Base Log @ 2026-04-15 15:46 UTC
### ✅ Working Streams: 153<br>❌ Dead Streams: 8 ### ✅ Working Streams: 149<br>❌ Dead Streams: 12
| Channel | Error (Code) | Link | | Channel | Error (Code) | Link |
| ------- | ------------ | ---- | | ------- | ------------ | ---- |
| Altitude Sports | HTTP Error (403) | `http://mytvstream.net:8080/live/A0t5Ax/625375/79545.m3u8` | | Aspire | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/150605.ts` |
| Antenna TV | HTTP Error (403) | `http://mytvstream.net:8080/live/A0t5Ax/625375/20180.m3u8` | | Comedy TV | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/199482.ts` |
| FDSN North | HTTP Error (403) | `http://mytvstream.net:8080/live/A0t5Ax/625375/20928.m3u8` | | Cozi TV | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/8392.ts` |
| FX Movie Channel | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/39873.ts` | | FX Movie Channel | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/39873.ts` |
| NBC Sports Bay Area | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/45785.ts` | | Game Show Network | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/466.ts` |
| Space City Home Network | HTTP Error (403) | `http://mytvstream.net:8080/live/A0t5Ax/625375/213668.m3u8` | | HBO Family | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/760.ts` |
| Spectrum SportsNet LA Dodgers | HTTP Error (403) | `http://mytvstream.net:8080/live/A0t5Ax/625375/31636.m3u8` | | Lifetime | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/4667.ts` |
| Spectrum SportsNet Lakers | HTTP Error (403) | `http://mytvstream.net:8080/live/A0t5Ax/625375/21842.m3u8` | | NBC Sports Boston | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/35132.ts` |
| Nick Jr | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/14835.ts` |
| TV One | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/13010.ts` |
| The Weather Channel | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/2361.ts` |
| YES Network | HTTP Error (404) | `http://iptvtree.net:8080/live/7e4b0dbd/1dd755dc3f/5519.ts` |
--- ---
#### Base Channels URL #### Base Channels URL
``` ```