mirror of
https://github.com/doms9/iptv.git
synced 2026-06-05 02:33:08 +02:00
Compare commits
34 commits
a2d2155bbf
...
9cee75af8e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cee75af8e | ||
|
|
d58c67312f | ||
|
|
01aba4bf0f | ||
|
|
db58351bc9 | ||
|
|
00000d9b6f | ||
|
|
ba7b3f4c43 | ||
|
|
e88ec91b3f | ||
|
|
ae2005408c | ||
|
|
2c11f5c8b0 | ||
|
|
bb56d06e39 | ||
|
|
7bd9c86630 | ||
|
|
d39a00c112 | ||
|
|
fd2413966b | ||
|
|
442a6c93cd | ||
|
|
93b6bab708 | ||
|
|
d8b3bb5038 | ||
|
|
2d8a1a897f | ||
|
|
ef22759a00 | ||
|
|
3b7b220ea7 | ||
|
|
3bcb705aa2 | ||
|
|
70ca06ac35 | ||
|
|
de9b3da2ab | ||
|
|
3a1534a9f1 | ||
|
|
4dbe4dca93 | ||
|
|
46ca04ff36 | ||
|
|
007ba7e6c1 | ||
|
|
53079a6665 | ||
|
|
7196753d81 | ||
|
|
ad583f5fdc | ||
|
|
b530c5980e | ||
|
|
2921373ef1 | ||
|
|
5dc73a9a98 | ||
|
|
3ed7fa51d6 | ||
|
|
8314907038 |
7 changed files with 125885 additions and 124216 deletions
1558
M3U8/TV.m3u8
1558
M3U8/TV.m3u8
File diff suppressed because it is too large
Load diff
246906
M3U8/TV.xml
246906
M3U8/TV.xml
File diff suppressed because one or more lines are too long
1558
M3U8/events.m3u8
1558
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,7 +1,8 @@
|
|||
import asyncio
|
||||
from functools import partial
|
||||
from urllib.parse import urljoin
|
||||
|
||||
from playwright.async_api import Browser
|
||||
from playwright.async_api import Browser, Page
|
||||
|
||||
from .utils import Cache, Time, get_logger, leagues, network
|
||||
|
||||
|
|
@ -22,6 +23,67 @@ 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())
|
||||
|
||||
|
|
@ -97,11 +159,10 @@ async def scrape(browser: Browser) -> None:
|
|||
for i, ev in enumerate(events, start=1):
|
||||
async with network.event_page(context) as page:
|
||||
handler = partial(
|
||||
network.process_event,
|
||||
process_event,
|
||||
url=(link := ev["link"]),
|
||||
url_num=i,
|
||||
page=page,
|
||||
log=log,
|
||||
)
|
||||
|
||||
url = await network.safe_process(
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ 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,16 +1,19 @@
|
|||
## Base Log @ 2026-05-26 22:03 UTC
|
||||
## Base Log @ 2026-05-27 22:17 UTC
|
||||
|
||||
### ✅ Working Streams: 150<br>❌ Dead Streams: 7
|
||||
### ✅ Working Streams: 147<br>❌ Dead Streams: 10
|
||||
|
||||
| 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