e
This commit is contained in:
parent
eb51119f78
commit
00000d9cc3
5 changed files with 220 additions and 36 deletions
|
|
@ -1,9 +1,10 @@
|
|||
from .cache import load_cache, write_cache
|
||||
from .config import LOGOS, TZ, UA, now
|
||||
from .logger import get_logger
|
||||
from .network import capture_req, get_base, new_browser, safe_process_event
|
||||
from .network import CLIENT, capture_req, get_base, new_browser, safe_process_event
|
||||
|
||||
__all__ = [
|
||||
"CLIENT",
|
||||
"LOGOS",
|
||||
"TZ",
|
||||
"UA",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@ from playwright.async_api import Browser, BrowserContext, Playwright, Request
|
|||
|
||||
from .config import UA
|
||||
|
||||
CLIENT = httpx.AsyncClient(
|
||||
timeout=5,
|
||||
follow_redirects=True,
|
||||
headers={"User-Agent": UA},
|
||||
)
|
||||
|
||||
|
||||
async def check_status(client: httpx.AsyncClient, url: str) -> bool:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue