mirror of
https://github.com/doms9/iptv.git
synced 2026-06-14 12:36:27 +02:00
Compare commits
No commits in common. "9cee75af8e7651c86297d4647e38c59d8937169e" and "a2d2155bbff6636014f18fe94aead39236b97b23" have entirely different histories.
9cee75af8e
...
a2d2155bbf
7 changed files with 124782 additions and 126451 deletions
1574
M3U8/TV.m3u8
1574
M3U8/TV.m3u8
File diff suppressed because it is too large
Load diff
248006
M3U8/TV.xml
248006
M3U8/TV.xml
File diff suppressed because one or more lines are too long
1574
M3U8/events.m3u8
1574
M3U8/events.m3u8
File diff suppressed because it is too large
Load diff
|
|
@ -69,7 +69,7 @@ async def main() -> None:
|
|||
asyncio.create_task(fawa.scrape()),
|
||||
asyncio.create_task(istreameast.scrape()),
|
||||
asyncio.create_task(mainportal.scrape()),
|
||||
# asyncio.create_task(ovogoal.scrape()),
|
||||
asyncio.create_task(ovogoal.scrape()),
|
||||
asyncio.create_task(shark.scrape()),
|
||||
asyncio.create_task(streamcenter.scrape()),
|
||||
asyncio.create_task(streamsgate.scrape()),
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import asyncio
|
||||
from functools import partial
|
||||
from urllib.parse import urljoin
|
||||
|
||||
from playwright.async_api import Browser, Page
|
||||
from playwright.async_api import Browser
|
||||
|
||||
from .utils import Cache, Time, get_logger, leagues, network
|
||||
|
||||
|
|
@ -23,67 +22,6 @@ def fix_league(s: str) -> str:
|
|||
return " ".join(x.capitalize() for x in s.split()) if len(s) > 5 else s.upper()
|
||||
|
||||
|
||||
async def process_event(
|
||||
url: str,
|
||||
url_num: int,
|
||||
page: Page,
|
||||
) -> str | None:
|
||||
|
||||
captured: list[str] = []
|
||||
|
||||
got_one = asyncio.Event()
|
||||
|
||||
handler = partial(
|
||||
network.capture_req,
|
||||
captured=captured,
|
||||
got_one=got_one,
|
||||
)
|
||||
|
||||
page.on("request", handler)
|
||||
|
||||
try:
|
||||
resp = await page.goto(
|
||||
url,
|
||||
wait_until="domcontentloaded",
|
||||
timeout=6_000,
|
||||
referer=BASE_URL,
|
||||
)
|
||||
|
||||
if not resp or resp.status != 200:
|
||||
log.warning(
|
||||
f"URL {url_num}) Status Code: {resp.status if resp else 'None'}"
|
||||
)
|
||||
return
|
||||
|
||||
wait_task = asyncio.create_task(got_one.wait())
|
||||
|
||||
try:
|
||||
await asyncio.wait_for(wait_task, timeout=6)
|
||||
except asyncio.TimeoutError:
|
||||
log.warning(f"URL {url_num}) Timed out waiting for M3U8.")
|
||||
return
|
||||
|
||||
finally:
|
||||
if not wait_task.done():
|
||||
wait_task.cancel()
|
||||
|
||||
try:
|
||||
await wait_task
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
|
||||
if captured:
|
||||
log.info(f"URL {url_num}) Captured M3U8")
|
||||
return captured[0]
|
||||
|
||||
except Exception as e:
|
||||
log.warning(f"URL {url_num}) {e}")
|
||||
return
|
||||
|
||||
finally:
|
||||
page.remove_listener("request", handler)
|
||||
|
||||
|
||||
async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
||||
now = Time.clean(Time.now())
|
||||
|
||||
|
|
@ -159,10 +97,11 @@ async def scrape(browser: Browser) -> None:
|
|||
for i, ev in enumerate(events, start=1):
|
||||
async with network.event_page(context) as page:
|
||||
handler = partial(
|
||||
process_event,
|
||||
network.process_event,
|
||||
url=(link := ev["link"]),
|
||||
url_num=i,
|
||||
page=page,
|
||||
log=log,
|
||||
)
|
||||
|
||||
url = await network.safe_process(
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ async def process_event(url: str, url_num: int) -> str | None:
|
|||
return f"https://mainstreams.pro/hls/{iframe_src.rsplit("=", 1)[-1]}.m3u8"
|
||||
|
||||
# return f"https://edgestreams.pro/hls/{iframe_src.rsplit("=", 1)[-1]}.m3u8"
|
||||
# return f"https://edge2caster.pro/hls/{iframe_src.rsplit("=", 1)[-1]}.m3u8"
|
||||
|
||||
|
||||
async def get_events() -> list[dict[str, str]]:
|
||||
|
|
|
|||
|
|
@ -1,19 +1,16 @@
|
|||
## Base Log @ 2026-05-27 22:17 UTC
|
||||
## Base Log @ 2026-05-26 22:03 UTC
|
||||
|
||||
### ✅ Working Streams: 147<br>❌ Dead Streams: 10
|
||||
### ✅ Working Streams: 150<br>❌ Dead Streams: 7
|
||||
|
||||
| Channel | Error (Code) | Link |
|
||||
| ------- | ------------ | ---- |
|
||||
| Bounce TV | HTTP Error (404) | `http://23.237.104.106:8080/USA_BOUNCE/index.m3u8` |
|
||||
| FDSN Detroit | HTTP Error (403) | `http://cdn1host.online:2999/live/bongus/35zqYxrbg0/317.ts` |
|
||||
| FDSN North | HTTP Error (403) | `http://cdn1host.online:2999/live/bongus/35zqYxrbg0/320.ts` |
|
||||
| FDSN Ohio | HTTP Error (403) | `http://cdn1host.online:2999/live/bongus/35zqYxrbg0/1207.ts` |
|
||||
| FDSN SoCal | HTTP Error (403) | `http://cdn1host.online:2999/live/bongus/35zqYxrbg0/665.ts` |
|
||||
| FDSN South | HTTP Error (403) | `http://cdn1host.online:2999/live/bongus/35zqYxrbg0/319.ts` |
|
||||
| FDSN Southwest | HTTP Error (403) | `http://cdn1host.online:2999/live/bongus/35zqYxrbg0/1189.ts` |
|
||||
| FDSN Sun | HTTP Error (403) | `http://cdn1host.online:2999/live/bongus/35zqYxrbg0/322.ts` |
|
||||
| FDSN West | HTTP Error (403) | `http://cdn1host.online:2999/live/bongus/35zqYxrbg0/1633.ts` |
|
||||
| FDSN Wisconsin | HTTP Error (403) | `http://cdn1host.online:2999/live/bongus/35zqYxrbg0/1621.ts` |
|
||||
| Lifetime | HTTP Error (403) | `http://cdn1host.online:2999/live/bongus/35zqYxrbg0/148.ts` |
|
||||
---
|
||||
#### Base Channels URL
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue