Compare commits

..

No commits in common. "13e9afae400e8e1a24bdd7fe70c2d8c39ad0807c" and "e0081a68c11e6a3cfca71413989e3579f76f5cd2" have entirely different histories.

7 changed files with 92550 additions and 89486 deletions

176268
EPG/TV.xml

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -57,7 +57,7 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
if not (html_data := await network.request(BASE_URL, log=log)): if not (html_data := await network.request(BASE_URL, log=log)):
return events return events
pattern = re.compile(r"^(?:LIVE|(?:[1-9]|[12]\d|30)\s+minutes?\b)", re.IGNORECASE) pattern = re.compile(r"^(?:LIVE|\d+\s+(minutes?)\b)", re.IGNORECASE)
soup = HTMLParser(html_data.content) soup = HTMLParser(html_data.content)
@ -67,14 +67,6 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
if not (rank_elem := li_item.css_first(".f1-podium--rank")): if not (rank_elem := li_item.css_first(".f1-podium--rank")):
continue continue
if not (time_elem := li_item.css_first(".SaatZamanBilgisi")):
continue
time_text = time_elem.text(strip=True)
if not pattern.search(time_text):
continue
sport = rank_elem.text(strip=True) sport = rank_elem.text(strip=True)
if not (driver_elem := li_item.css_first(".f1-podium--driver")): if not (driver_elem := li_item.css_first(".f1-podium--driver")):
@ -91,6 +83,14 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
if not (href := link.attributes.get("href")): if not (href := link.attributes.get("href")):
continue continue
if not (time_elem := li_item.css_first(".SaatZamanBilgisi")):
continue
time_text = time_elem.text(strip=True)
if not pattern.search(time_text):
continue
events.append( events.append(
{ {
"sport": sport, "sport": sport,

View file

@ -260,19 +260,6 @@
] ]
} }
}, },
{
"COPA DEL REY": {
"logo": "https://a.espncdn.com/combiner/i?img=/i/leaguelogos/soccer/500/80.png",
"names": [
"KING'S CUP",
"KINGS CUP",
"LA COPA",
"SPAIN COPA DEL REY",
"SPANISH COPA DEL REY",
"SPANISH CUP"
]
}
},
{ {
"COPA LIBERTADORES": { "COPA LIBERTADORES": {
"logo": "https://a.espncdn.com/combiner/i?img=/i/leaguelogos/soccer/500/58.png", "logo": "https://a.espncdn.com/combiner/i?img=/i/leaguelogos/soccer/500/58.png",
@ -296,12 +283,6 @@
"names": ["ITALIAN CUP"] "names": ["ITALIAN CUP"]
} }
}, },
{
"COUPE DE FRANCE": {
"logo": "https://a.espncdn.com/combiner/i?img=/i/leaguelogos/soccer/500/182.png",
"names": ["FRANCE CUP", "FRENCH CUP"]
}
},
{ {
"EFL": { "EFL": {
"logo": "https://i.gyazo.com/c8842fbcb2eeb6a53bc69fa6055b8b5d.png", "logo": "https://i.gyazo.com/c8842fbcb2eeb6a53bc69fa6055b8b5d.png",

View file

@ -17,7 +17,7 @@ TAG = "WATCHFTY"
CACHE_FILE = Cache(f"{TAG.lower()}.json", exp=10_800) CACHE_FILE = Cache(f"{TAG.lower()}.json", exp=10_800)
API_FILE = Cache(f"{TAG.lower()}-api.json", exp=19_800) API_FILE = Cache(f"{TAG.lower()}-api.json", exp=28_800)
API_URL = "https://api.watchfooty.st" API_URL = "https://api.watchfooty.st"
@ -76,8 +76,6 @@ async def process_event(
context: BrowserContext, context: BrowserContext,
) -> str | None: ) -> str | None:
pattern = re.compile(r"\((\d+)\)")
page = await context.new_page() page = await context.new_page()
captured: list[str] = [] captured: list[str] = []
@ -113,31 +111,18 @@ async def process_event(
return return
if not (match := pattern.search(text)) or int(match[1]) == 0: match = re.search(r"\((\d+)\)", text)
if not match or int(match[1]) == 0:
log.warning(f"URL {url_num}) No available stream links.") log.warning(f"URL {url_num}) No available stream links.")
return return
try:
first_available = await page.wait_for_selector( first_available = await page.wait_for_selector(
'a[href*="/stream/"]', 'a[href*="/stream/"]', timeout=3_000
timeout=3_000,
) )
except TimeoutError:
log.warning(f"URL {url_num}) No available stream links.")
return await first_available.click()
if not (href := await first_available.get_attribute("href")):
log.warning(f"URL {url_num}) No available stream links.")
return
await page.goto(
href,
wait_until="domcontentloaded",
timeout=5_000,
)
wait_task = asyncio.create_task(got_one.wait()) wait_task = asyncio.create_task(got_one.wait())

View file

@ -1,7 +1,11 @@
## Base Log @ 2025-12-19 20:41 UTC ## Base Log @ 2025-12-18 20:40 UTC
### ✅ Working Streams: 146<br>❌ Dead Streams: 0 ### ✅ Working Streams: 144<br>❌ Dead Streams: 2
| Channel | Error (Code) | Link |
| ------- | ------------ | ---- |
| ESPN U | HTTP Error (403) | `http://cord-cutter.net:8080/30550113/30550113/10255` |
| ION TV | HTTP Error (403) | `http://cord-cutter.net:8080/30550113/30550113/9297` |
--- ---
#### Base Channels URL #### Base Channels URL
``` ```