mirror of
https://github.com/doms9/iptv.git
synced 2026-06-15 12:46:27 +02:00
Compare commits
No commits in common. "a8988791bb61a80ed312bdc012ea72f5db3172fd" and "448fbe17fa96617e0047cd44688e4a6058a28996" have entirely different histories.
a8988791bb
...
448fbe17fa
6 changed files with 123046 additions and 124900 deletions
2508
M3U8/TV.m3u8
2508
M3U8/TV.m3u8
File diff suppressed because it is too large
Load diff
242325
M3U8/TV.xml
242325
M3U8/TV.xml
File diff suppressed because one or more lines are too long
2508
M3U8/events.m3u8
2508
M3U8/events.m3u8
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,4 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import json
|
|
||||||
import re
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from urllib.parse import urljoin
|
from urllib.parse import urljoin
|
||||||
|
|
||||||
|
|
@ -55,30 +53,35 @@ async def process_event(
|
||||||
return m3u8_url
|
return m3u8_url
|
||||||
|
|
||||||
|
|
||||||
|
async def get_api_data() -> dict[str, dict[str, list[dict]]]:
|
||||||
|
tasks = [
|
||||||
|
(
|
||||||
|
sport,
|
||||||
|
network.request(
|
||||||
|
urljoin(url, "api/v2/stateshot"),
|
||||||
|
log=log,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
for sport, url in API_URLS.items()
|
||||||
|
]
|
||||||
|
|
||||||
|
results = await asyncio.gather(*(task for _, task in tasks))
|
||||||
|
|
||||||
|
return {sport: r.json() for (sport, _), r in zip(tasks, results) if r}
|
||||||
|
|
||||||
|
|
||||||
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()]
|
|
||||||
|
|
||||||
results = await asyncio.gather(*tasks)
|
|
||||||
|
|
||||||
events = []
|
|
||||||
|
|
||||||
if not (html_data := [(html.text, html.url) for html in results if html]):
|
|
||||||
return events
|
|
||||||
|
|
||||||
now = Time.clean(Time.now())
|
now = Time.clean(Time.now())
|
||||||
|
|
||||||
stateshot_ptrn = re.compile(r"var\s+stateshot\s+=\s+(.*);", re.I)
|
api_data = await get_api_data()
|
||||||
|
|
||||||
|
events = []
|
||||||
|
|
||||||
start_dt = now.delta(hours=-1)
|
start_dt = now.delta(hours=-1)
|
||||||
end_dt = now.delta(minutes=1)
|
end_dt = now.delta(minutes=1)
|
||||||
|
|
||||||
for content, url in html_data:
|
for sport in api_data:
|
||||||
sport = next((k for k, v in BASE_URLS.items() if v == url), "Live Event")
|
data = api_data[sport]
|
||||||
|
|
||||||
if not (match := stateshot_ptrn.search(content)):
|
|
||||||
continue
|
|
||||||
|
|
||||||
data: dict = json.loads(f"{match[1]}")
|
|
||||||
|
|
||||||
teams = data.get("teams", {})
|
teams = data.get("teams", {})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ TAG = "WATCHFTY"
|
||||||
|
|
||||||
CACHE_FILE = Cache(TAG, exp=10_800)
|
CACHE_FILE = Cache(TAG, exp=10_800)
|
||||||
|
|
||||||
BASE_DOMAIN = "watchfooty.ru"
|
BASE_DOMAIN = "watchfooty.st"
|
||||||
|
|
||||||
API_URL, BASE_URL = f"https://api.{BASE_DOMAIN}", f"https://www.{BASE_DOMAIN}"
|
API_URL, BASE_URL = f"https://api.{BASE_DOMAIN}", f"https://www.{BASE_DOMAIN}"
|
||||||
|
|
||||||
|
|
|
||||||
10
readme.md
10
readme.md
|
|
@ -1,13 +1,7 @@
|
||||||
## Base Log @ 2026-05-16 21:10 UTC
|
## Base Log @ 2026-05-15 16:20 UTC
|
||||||
|
|
||||||
### ✅ Working Streams: 156<br>❌ Dead Streams: 4
|
### ✅ Working Streams: 160<br>❌ Dead Streams: 0
|
||||||
|
|
||||||
| Channel | Error (Code) | Link |
|
|
||||||
| ------- | ------------ | ---- |
|
|
||||||
| ABC | HTTP Error (404) | `http://stream.cammonitorplus.net/1809/index.m3u8` |
|
|
||||||
| Comedy TV | HTTP Error (403) | `http://realsport.scalecdn.co:8080/live/supersonicstreams/cUewZolveU8Jh18jk34BDJ/77411.ts` |
|
|
||||||
| Fox | HTTP Error (404) | `http://stream.cammonitorplus.net/1752/index.m3u8` |
|
|
||||||
| NBC | HTTP Error (404) | `http://stream.cammonitorplus.net/1812/index.m3u8` |
|
|
||||||
---
|
---
|
||||||
#### Base Channels URL
|
#### Base Channels URL
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue