e
This commit is contained in:
parent
b3d3df3d5b
commit
00000d9ee7
2 changed files with 7 additions and 5 deletions
|
|
@ -142,7 +142,7 @@ async def scrape(client: httpx.AsyncClient) -> None:
|
|||
tvg_id, pic = leagues.get_tvg_info(sport, event)
|
||||
|
||||
entry = {
|
||||
"url": url,
|
||||
"url": url.replace("540p", "720p"),
|
||||
"logo": logo or pic,
|
||||
"base": "",
|
||||
"timestamp": ts,
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
import asyncio
|
||||
import logging
|
||||
import re
|
||||
from collections.abc import Callable
|
||||
from collections.abc import Awaitable, Callable
|
||||
from functools import partial
|
||||
from typing import Any
|
||||
from typing import TypeVar
|
||||
|
||||
import httpx
|
||||
from playwright.async_api import Browser, BrowserContext, Playwright, Request
|
||||
|
||||
from .logger import get_logger
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
class Network:
|
||||
UA = (
|
||||
|
|
@ -49,11 +51,11 @@ class Network:
|
|||
|
||||
@staticmethod
|
||||
async def safe_process(
|
||||
fn: Callable,
|
||||
fn: Callable[[], Awaitable[T]],
|
||||
url_num: int,
|
||||
timeout: int | float = 15,
|
||||
log: logging.Logger | None = None,
|
||||
) -> Any | None:
|
||||
) -> T | None:
|
||||
|
||||
if not log:
|
||||
log = logging.getLogger(__name__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue