Spaces:
Running
Running
Download dengtaishan-src/tools/r429.py from Ethscriptions/mx: direct link, hf CLI and curl.
- Browser
- Download file 656 Bytes
-
https://huggingface.co/spaces/Ethscriptions/mx/resolve/main/dengtaishan-src/tools/r429.py
- Command line
-
hf download hf://spaces/Ethscriptions/mx/dengtaishan-src/tools/r429.py
-
curl -L -o r429.py https://huggingface.co/spaces/Ethscriptions/mx/resolve/main/dengtaishan-src/tools/r429.py
656 Bytes
| import asyncio | |
| from playwright.async_api import async_playwright | |
| async def main(): | |
| async with async_playwright() as p: | |
| b = await p.chromium.launch() | |
| pg = await b.new_page() | |
| bad=[]; n=[0] | |
| def on(r): | |
| n[0]+=1 | |
| if r.status>=400: bad.append((r.status, r.url[:90])) | |
| pg.on("response", on) | |
| await pg.goto("https://ethscriptions-mx.static.hf.space/") | |
| await pg.wait_for_timeout(15000) | |
| print("responses", n[0]); [print(x) for x in bad[:20]] | |
| print("voice ok?", await pg.evaluate("document.body.innerText.includes('旁白')")) | |
| await b.close() | |
| asyncio.run(main()) | |